Bug 41420 - Syntax error in referrer in parcel.tt
Summary: Syntax error in referrer in parcel.tt
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Baptiste Wojtkowski (bwoj)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-10 09:48 UTC by Baptiste Wojtkowski (bwoj)
Modified: 2025-12-13 23:26 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the URL for the "Cancel order and catalog record" link when receiving an order for an invoice - the referrer section of the URL was missing.
Version(s) released in:
Circulation function:


Attachments
Bug 41420: Fix referrer in parcel.tt (2.00 KB, patch)
2025-12-10 10:08 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review
Bug 41420: Fix referrer in parcel.tt (2.05 KB, patch)
2025-12-13 23:17 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 Baptiste Wojtkowski (bwoj) 2025-12-10 09:48:06 UTC
Steps to reproduce :
1 - Go to http://localhost:8081/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1 and fill in a new item. 
2 - Visit http://localhost:8081/cgi-bin/koha/acqui/parcels.pl?booksellerid=1, type an invoice name and validate. Inspect both "Cancel order" and "Cancel order and catalog record". Notice the link in "Cancel order is broken"

Note: it seems that it has no impact on main, but we got some issues with some customers.
Comment 1 Baptiste Wojtkowski (bwoj) 2025-12-10 10:08:05 UTC
Created attachment 190390 [details] [review]
Bug 41420: Fix referrer in parcel.tt

Test plan:

Steps to reproduce :
1 - Go to http://localhost:8081/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1 and fill in a new item.
2 - Visit http://localhost:8081/cgi-bin/koha/acqui/parcels.pl?booksellerid=1, type an invoice name and validate. Inspect both "Cancel order" and "Cancel order and catalog record". Notice the link in "Cancel order is broken"
3 - Apply patch
4 - Repeat 3 and notice the referrer is well formed.

For a reason I ignore, it does not seem to have an impact on main, but
on the 24.11 I tested, if you click on cancel order, after confirming
the deletion and clicking on "ok", you will be asked again to confirm,
    however the deletion has been performed
Comment 2 David Nind 2025-12-13 23:17:47 UTC
Created attachment 190487 [details] [review]
Bug 41420: Fix referrer in parcel.tt

Test plan:

Steps to reproduce :
1 - Go to http://localhost:8081/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1 and fill in a new item.
2 - Visit http://localhost:8081/cgi-bin/koha/acqui/parcels.pl?booksellerid=1, type an invoice name and validate. Inspect both "Cancel order" and "Cancel order and catalog record". Notice the link in "Cancel order is broken"
3 - Apply patch
4 - Repeat 3 and notice the referrer is well formed.

For a reason I ignore, it does not seem to have an impact on main, but
on the 24.11 I tested, if you click on cancel order, after confirming
the deletion and clicking on "ok", you will be asked again to confirm,
    however the deletion has been performed

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-12-13 23:26:39 UTC
Testing notes (using KTD):

1. Comparison of URL for the "Cancel order and catalog record" on the receive orders page for an invoice - note that the referrer URL is missing before the patch:
- Before patch: cgi-bin/koha/acqui/cancelorder.pl?ordernumber=3&biblionumber=21649&del_biblio=1&referrer=
- After patch: /cgi-bin/koha/acqui/cancelorder.pl?ordernumber=3&biblionumber=21649&del_biblio=1&referrer=/cgi-bin/koha/acqui/parcel.pl?invoiceid=2

2. The links still worked before the patch and the order and catalog record was deleted--I'm not sure what the referrer part of the URL actually does.

3. Changed bug from "enhancement" to "normal".