Bug 35938

Summary: Add lots of biblios to a list causes a URL too long error
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: ListsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy, mathsabypro
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Martin Renvoize (ashimema) 2024-01-30 09:48:56 UTC
/virtualshelves/addbybiblionumber.pl can easily exceed the maximum number of characters a URL is allowed to contain when submitting large numbers of biblionumbers.

We should be able to significantly reduce this by simply reducing the parameter name from 'biblionumber' to 'bib' or 'b'.. or we could work on an alternative submission mechanism.
Comment 1 Mathieu Saby 2024-06-17 06:13:27 UTC
Shouldn't these parameters be transmitted using the POST method?
Comment 2 Martin Renvoize (ashimema) 2024-06-17 06:49:03 UTC
Yeah, it should probably be a POST
Comment 3 Mathieu Saby 2024-06-20 08:34:54 UTC
I thought there was a REST API for managing virtualsheves. It seems it is not yet the case ?
Comment 4 Katrin Fischer 2024-06-20 09:08:01 UTC
(In reply to Mathieu Saby from comment #3)
> I thought there was a REST API for managing virtualsheves. It seems it is
> not yet the case ?

Not yet I think, looking at api.koha-community.org.
Comment 5 Mathieu Saby 2024-06-25 07:10:37 UTC
I think we can improve the current behavior, without creating an API (for now)



Look at the button "add to list" displayed in report result page (/koha/reports/guided_reports.pl) when the result is a list of record : 

The URL of the generated popup looks like that : 

koha/virtualshelves/addbybiblionumber.pl?biblionumbers=1/2/3/4/5/6/7

So I presume we can use this short syntax elsewhere in Koha ?