Bug 36511

Summary: Some scripts missing a dependency following Bug 24879
Product: Koha Reporter: Isabel Pineda <isabel.pineda>
Component: CatalogingAssignee: Owen Leonard <oleonard>
Status: Pushed to oldoldoldstable --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: boris.dovbnya, dcook, fridolin.somers, hansulrich.frink, jonathan.druart, lucas, m.de.rooy, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.04,23.05.10,22.11.16,22.05.20
Circulation function:
Bug Depends on: 24879    
Bug Blocks:    
Attachments: Bug 36511: Some scripts missing a dependency following Bug 24879
Bug 36511: Some scripts missing a dependency following Bug 24879
Bug 36511: Some scripts missing a dependency following Bug 24879

Description Isabel Pineda 2024-04-03 22:02:51 UTC
Today I updated Koha from version 23.11.03 to 23.11.04 and now the local cover images of the books are not visible anymore in the admin interface. In the OPAC they are still visible normally. When I upload a new local cover image, I can see it in the OPAC interface too, but not in the admin interface.
Is there some error in the update?
Comment 1 boris.dovbnya 2024-04-09 10:08:14 UTC
My problem is described exactly here (Bug 36511). A speedy correction would be greatly appreciated. I'm waiting for help.
Comment 2 Owen Leonard 2024-04-09 15:44:23 UTC
git bisect tells me this is caused by Bug 24879
Comment 3 Owen Leonard 2024-04-09 15:44:49 UTC
The error I get is:

Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_catalogue_image_2epl::check_cookie_auth called at /kohadevbox/koha/catalogue/image.pl line 36
Comment 4 Owen Leonard 2024-04-09 17:01:38 UTC
Created attachment 164566 [details] [review]
Bug 36511: Some scripts missing a dependency following Bug 24879

These files needed the addition of 'use C4::Auth qw( check_cookie_auth
);'.

To test, apply the patch and restart services.

- If necessary, enable the LocalCoverImages system preference.
- Open the browser console and then the "Network" tab. You can click
  "Images" to filter for the correct kind of request.
- Perform a catalog search. After the search has loaded, check that
  there are no 500 errors in the Network tab.

- Go to Cataloging -> Label creator.
- If necessary, create a label batch and add some items.
- Export your batch and test both the "Download as CSV" and "Download as
  XML" links. Both should trigger the correct download.

- Go to Serials -> Claims, and select a vendor with late issues.
- Select all late issues and click "Download selected claims" at the
  bottom of the page.
- Your CSV file should download correctly.

The file acqui/check_uniqueness.pl has been corrected as well but I'm
not sure how to test it!
Comment 5 Danyon Sewell 2024-04-10 02:54:00 UTC
Created attachment 164574 [details] [review]
Bug 36511: Some scripts missing a dependency following Bug 24879

These files needed the addition of 'use C4::Auth qw( check_cookie_auth
);'.

To test, apply the patch and restart services.

- If necessary, enable the LocalCoverImages system preference.
- Open the browser console and then the "Network" tab. You can click
  "Images" to filter for the correct kind of request.
- Perform a catalog search. After the search has loaded, check that
  there are no 500 errors in the Network tab.

- Go to Cataloging -> Label creator.
- If necessary, create a label batch and add some items.
- Export your batch and test both the "Download as CSV" and "Download as
  XML" links. Both should trigger the correct download.

- Go to Serials -> Claims, and select a vendor with late issues.
- Select all late issues and click "Download selected claims" at the
  bottom of the page.
- Your CSV file should download correctly.

The file acqui/check_uniqueness.pl has been corrected as well but I'm
not sure how to test it!

Signed-off-by: danyonsewell <danyonsewell@catalyst.net.nz>
Comment 6 Jonathan Druart 2024-04-10 06:47:13 UTC
Created attachment 164577 [details] [review]
Bug 36511: Some scripts missing a dependency following Bug 24879

These files needed the addition of 'use C4::Auth qw( check_cookie_auth
);'.

To test, apply the patch and restart services.

- If necessary, enable the LocalCoverImages system preference.
- Open the browser console and then the "Network" tab. You can click
  "Images" to filter for the correct kind of request.
- Perform a catalog search. After the search has loaded, check that
  there are no 500 errors in the Network tab.

- Go to Cataloging -> Label creator.
- If necessary, create a label batch and add some items.
- Export your batch and test both the "Download as CSV" and "Download as
  XML" links. Both should trigger the correct download.

- Go to Serials -> Claims, and select a vendor with late issues.
- Select all late issues and click "Download selected claims" at the
  bottom of the page.
- Your CSV file should download correctly.

The file acqui/check_uniqueness.pl has been corrected as well but I'm
not sure how to test it!

Signed-off-by: danyonsewell <danyonsewell@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Katrin Fischer 2024-04-10 07:11:33 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 8 David Cook 2024-04-11 03:32:57 UTC
We just bumped into this as well for 23.11.04. Will need to backport this one pretty widely.
Comment 9 Hans Ulrich Frink 2024-04-11 11:16:47 UTC
Our koha install is showing this error, too. I patched image.pl with the additional line. The error persisted: in admin page no local cover images are shown.
GET https://gagldkohastaff.duckdns.org/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=1243 500 (Internal Server Error)

Do I have to apply the patch to all 5 files?
thanks
Uli
Comment 10 Fridolin Somers 2024-04-11 14:05:00 UTC
Pushed to 23.11.x on top of v23.11.04
Comment 11 Lucas Gass (lukeg) 2024-04-11 14:36:49 UTC
Pushed to 23.05.10 and packaged for 23.05.10-02
Comment 12 Wainui Witika-Park 2024-04-16 01:50:55 UTC
Pushed to 22.05.x for 22.05.20-3
Comment 13 Wainui Witika-Park 2024-04-16 04:55:54 UTC
(In reply to wainuiwitikapark from comment #12)
> Pushed to 22.05.x for 22.05.20-3

*v22.05.20-2
Comment 14 Fridolin Somers 2024-04-18 06:44:16 UTC
I see it in in 22.11.16