Bug 40306 - Use GET in form of value_builder/unimarc_field_4XX.pl
Summary: Use GET in form of value_builder/unimarc_field_4XX.pl
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on: 34478 36192
Blocks:
  Show dependency treegraph
 
Reported: 2025-07-04 11:38 UTC by Fridolin Somers
Modified: 2025-07-18 10:18 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes searching for terms when using the unimarc_field_4XX.pl value builder. The 'Start search' button now works, instead of doing nothing. (UNIMARC instances.) (This is related to the CSRF changes added in Koha 24.05 to improve form security.)
Version(s) released in:
Circulation function:


Attachments
Bug 40306: Use GET in form of value_builder/unimarc_field_4XX.pl (4.64 KB, patch)
2025-07-04 11:58 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 40306: Use GET in form of value_builder/unimarc_field_4XX.pl (4.69 KB, patch)
2025-07-05 01:56 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2025-07-04 11:38:09 UTC
Since CSRF procetion form without CUD action must use GET instead of POST

Fix value_builder/unimarc_field_4XX.pl
Comment 1 Fridolin Somers 2025-07-04 11:42:02 UTC
Like Bug 36577 for MARC21
Comment 2 Fridolin Somers 2025-07-04 11:58:30 UTC
Created attachment 183791 [details] [review]
Bug 40306: Use GET in form of value_builder/unimarc_field_4XX.pl

Since CSRF procetion form without CUD action must use GET instead of POST
Fix value_builder/unimarc_field_4XX.pl

Test plan:
1) Use UNIMARC DB
2) Be sure value builder unimarc_field_4XX.pl is defined on 461$t
3) Create a new biblio record
4) On 461$t click on 'Tag editor' icon
5) Perform a search
6) Click on choose
7) Field 461 is filled
Comment 3 David Nind 2025-07-05 01:56:03 UTC
Created attachment 183804 [details] [review]
Bug 40306: Use GET in form of value_builder/unimarc_field_4XX.pl

Since CSRF procetion form without CUD action must use GET instead of POST
Fix value_builder/unimarc_field_4XX.pl

Test plan:
1) Use UNIMARC DB
2) Be sure value builder unimarc_field_4XX.pl is defined on 461$t
3) Create a new biblio record
4) On 461$t click on 'Tag editor' icon
5) Perform a search
6) Click on choose
7) Field 461 is filled

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2025-07-05 02:09:01 UTC
Testing notes (using KTD):
1. Startup KTD with UNIMARTC: Edit your .env file and set KOHA_MARC_FLAVOUR=unimarc
2. For the default framework, the value builder unimarc_field_4XX.pl is already configured for 461$t.
3. Create a new bibliographic record.
4. For 461$t, click the 'Tag editor'.
5. Search for something, for example: a
6. Click 'Start search' - nothing happens.
7. Apply the patch.
8. Refresh the editor and repeat steps 4 and 5.
9. The 'Start search' button now works.
Comment 5 Marcel de Rooy 2025-07-09 14:24:07 UTC
Looks like number.startfrom is wrong too ?