Bug 14202

Summary: Unexpected parameter for window.open in marc21_linking_section plugin
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: CatalogingAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: f.demians, m.de.rooy, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13437
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14202: Unexpected parameter for window.open in marc21_linking_section.pl
Bug 14202: Unexpected parameter for window.open in marc21_linking_section.pl
[PASSED QA] Bug 14202: Unexpected parameter for window.open in marc21_linking_section.pl

Description Marcel de Rooy 2015-05-14 13:06:58 UTC
Code contains:

window.open(\"/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=marc21_linking_section.pl&index=\" + i + \"&result=\"+defaultvalue,\"marc21_field_7\"+i+\"\",'width=900,height=700,toolbar=false,scrollbars=yes');

The part ,\"marc21_field_7\"+i+\"\", is somewhat unexpected.
If I am correct, js could interpret this as the name parameter of window.open.
Note that this name is not the title.

I propose to remove it.
Comment 1 Marcel de Rooy 2015-07-14 20:04:05 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2015-11-05 06:41:27 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2015-11-06 15:50:32 UTC
Created attachment 44583 [details] [review]
[PASSED QA] Bug 14202: Unexpected parameter for window.open in marc21_linking_section.pl

The builder of this plugin includes a window.open call with the name
parameter: \"marc21_field_7\"+ event.data.id +\"\"
Note that this is not the name of the new window.
This trivial patch adjusts this unusual name by tag_editor like other
plugins.

Test plan:
Attach marc21_linking_section to 773$9.
Click on the Tag editor button.
If it opens, it still works :)
Note that the name of the popup is still:
    Koha > Cataloguing > plugin for links

Signed-off-by: Fredreic Demians <f.demians@tamil.fr>
  Plugin still working, with a valid pop-pup window id.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi 2015-11-06 18:14:30 UTC
Patch pushed to master.

Thanks Marcel!