Bug 32569 - CloneSubfield() and CloneField() function can result in duplicate ID's when using the upload cataloging plugin
Summary: CloneSubfield() and CloneField() function can result in duplicate ID's when u...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 30975
Blocks:
  Show dependency treegraph
 
Reported: 2023-01-04 22:02 UTC by Lucas Gass (lukeg)
Modified: 2024-07-04 20:37 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2023-01-04 22:02:38 UTC
This problem was exposed when trying to clone 856 fields while using the upload.pl cataloging plugin. 

To recreate:
1. Edit a framework so that the 856$u uses the upload.pl plugin.
2. Go to a record within that framework using the basic editor. 
3. Create and 856u, if you don't already have one. 
4. Now try and clone the entire field. Look at the ID on the upload button, it beings with 'buttonDot_tag_856_subfield_u_'
5. Notice that the ID is the same as the one you cloned it from. Because of this you cannot use the 2nd 'upload link'.
6. Save you changes and exit the basic editor.
7. Go back into the editor and the new fields now have a different ID and the upload links work correctly.
Comment 1 Marcel de Rooy 2023-11-09 09:37:29 UTC
This works for me. Apparently solved by bug 33744.
Please try again. Reopen if needed.
Comment 2 Marcel de Rooy 2023-11-09 09:42:40 UTC
Also note that 30975 still improves this code.