Bug 23319

Summary: Reloading page when adding to basket from existing order can cause internal server error
Product: Koha Reporter: Nick Clemens <nick>
Component: AcquisitionsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, katrin.fischer, lucas, martin.renvoize, maryse.simard
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.04
Attachments: Implement blocking errors for neworderbiblio and basket.pl
Implement blocking errors for neworderbiblio and basket.pl
Bug 23319: Implement blocking errors for neworderbiblio and basket.pl

Description Nick Clemens 2019-07-15 17:51:51 UTC
To recreate:
1 - Have a basket in acquisitions
2 - Add to basket from an existing record
3 - Perform a search with results
4 - Note the URL has no params
5 - Refresh the page
6 - Get an error
Comment 1 Nick Clemens 2019-07-15 17:52:22 UTC
Created attachment 91538 [details] [review]
Implement blocking errors for neworderbiblio and basket.pl

To test:
1 - Hit neworderbiblio with a query and no vendor
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat
    Or, add to basket from existing record with a search
    Refresh the page (url has no parameters)
2 - Get an internal server error
3 - Add bookseller
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat&booksellerid=1
4 - Click 'Order' on a result
5 - Internal server error
6 - Apply patch
7 - Repeat 1-4, you get 'Vendor not found' or 'Basket not found'
Comment 2 Maryse Simard 2019-07-19 21:10:10 UTC
Created attachment 91675 [details] [review]
Implement blocking errors for neworderbiblio and basket.pl

To test:
1 - Hit neworderbiblio with a query and no vendor
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat
    Or, add to basket from existing record with a search
    Refresh the page (url has no parameters)
2 - Get an internal server error
3 - Add bookseller
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat&booksellerid=1
4 - Click 'Order' on a result
5 - Internal server error
6 - Apply patch
7 - Repeat 1-4, you get 'Vendor not found' or 'Basket not found'

https://bugs.koha-community.org/show_bug.cgi?id=23319
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 3 Katrin Fischer 2019-08-10 11:47:49 UTC
Don't forget the bug number in your commit messages!
Comment 4 Katrin Fischer 2019-08-10 11:56:57 UTC
Created attachment 92126 [details] [review]
Bug 23319: Implement blocking errors for neworderbiblio and basket.pl

To test:
1 - Hit neworderbiblio with a query and no vendor
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat
    Or, add to basket from existing record with a search
    Refresh the page (url has no parameters)
2 - Get an internal server error
3 - Add bookseller
    http://localhost:8081/cgi-bin/koha/acqui/neworderbiblio.pl?q=cat&booksellerid=1
4 - Click 'Order' on a result
5 - Internal server error
6 - Apply patch
7 - Repeat 1-4, you get 'Vendor not found' or 'Basket not found'

https://bugs.koha-community.org/show_bug.cgi?id=23319
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Martin Renvoize 2019-08-13 10:33:38 UTC
Nice work!

Pushed to master for 19.11.00
Comment 6 Fridolin Somers 2019-09-02 12:19:28 UTC
Pushed to 19.05.x for 19.05.04
Comment 7 Lucas Gass 2019-09-17 19:44:37 UTC
backported to 18.11.x for 18.11.10