Bug 14202 - Unexpected parameter for window.open in marc21_linking_section plugin
Summary: Unexpected parameter for window.open in marc21_linking_section plugin
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-14 13:06 UTC by Marcel de Rooy
Modified: 2016-06-21 21:39 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14202: Unexpected parameter for window.open in marc21_linking_section.pl (2.09 KB, patch)
2015-07-14 20:04 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 14202: Unexpected parameter for window.open in marc21_linking_section.pl (2.15 KB, patch)
2015-11-05 06:41 UTC, Frédéric Demians
Details | Diff | Splinter Review
[PASSED QA] Bug 14202: Unexpected parameter for window.open in marc21_linking_section.pl (2.22 KB, patch)
2015-11-06 15:50 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!