Bug 37330

Summary: LocalCoverImages for items don't show after 33526
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: normal    
Priority: P5 - low CC: david, gmcharlt, lucas, oleonard, ovezina
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.11.00
Circulation function:
Bug Depends on: 33526    
Bug Blocks:    
Attachments: Bug 37330: Add drawcallback if LocalCoverImages
Bug 37330: (bug 33526 follow-up) Fix display of cover images for items
Bug 37330: Fix callback table selector
Bug 37330: (bug 33526 follow-up) Fix display of cover images for items
Bug 37330: (bug 33526 follow-up) Fix display of cover images for items

Description Pedro Amorim 2024-07-11 16:38:17 UTC

    
Comment 1 Pedro Amorim 2024-07-11 16:39:33 UTC
Created attachment 168843 [details] [review]
Bug 37330: Add drawcallback if LocalCoverImages

1) Enable LocalCoverImages
2) Visit a biblio:
/cgi-bin/koha/catalogue/detail.pl?biblionumber=294
3) On the actions column, click the arrow and click upload image, submit an image
4) Go back to biblio, notice the image shows for the specific item
5) Disable StaffDetailItemSelection
6) Go back to biblio, notice the image is gone
7) Apply patch. Repeat.
Comment 2 David Nind 2024-07-11 22:52:49 UTC
Something weird is going on here for me with item cover images.

Tested on the latest main, with everything up to date for KTD, and clearing browser caches between changes.

Before the patch, the item cover image is NOT showing for the individual item in the holdings table, but is showing for the record cover images.

This is without the patch and after the patch, and with and without StaffDetailItemSelection enabled.

That is (for me), no item cover images are showing for any of the combinations before and after the patch. I've tested before and after in Firefox and Chromium.

I've also tested with combinations of AllowMultipleCovers, LocalCoverImages, OPACLocalCoverImages.

I thought it may have been something with Bug 33526 - Use template wrapper for tabs: bibliographic detail page and Bug 36966 - Fix links for local cover images for items on staff detail page. These are in main, but if I use 24.05.01 I still get the same behavour.
Comment 3 Olivier Vezina 2024-09-13 14:52:12 UTC
The StaffDetailItemSelection seems to be gone in the current main. I don't know if this voids this patch
Comment 4 Katrin Fischer 2024-09-13 14:57:19 UTC
I think you might still be able to test it. We removed it, but it defaults to "ON" now.
Comment 5 Jonathan Druart 2024-09-16 09:34:40 UTC
Created attachment 171519 [details] [review]
Bug 37330: (bug 33526 follow-up) Fix display of cover images for items

The id has been modified by bug 33526. We can simply pass the table
element however.

Test plan:
Have some cover images at item level and notice that they are correctly
displayed on the bibliographic record detail page.

Note that the slider does not work correctly. If you click on the dot
(so if you have several images for an item) the scrollbar is going to
hit the top of the page and the image won't change.
Could be reported separately if not done yet.
Comment 6 Pedro Amorim 2024-09-16 09:57:38 UTC Comment hidden (obsolete)
Comment 7 Pedro Amorim 2024-09-16 10:01:11 UTC
Created attachment 171523 [details] [review]
Bug 37330: (bug 33526 follow-up) Fix display of cover images for items

The id has been modified by bug 33526. We can simply pass the table
element however.

Test plan:
Have some cover images at item level and notice that they are correctly
displayed on the bibliographic record detail page.

Note that the slider does not work correctly. If you click on the dot
(so if you have several images for an item) the scrollbar is going to
hit the top of the page and the image won't change.
Could be reported separately if not done yet.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 8 Nick Clemens (kidclamp) 2024-09-16 18:11:32 UTC
Created attachment 171591 [details] [review]
Bug 37330: (bug 33526 follow-up) Fix display of cover images for items

The id has been modified by bug 33526. We can simply pass the table
element however.

Test plan:
Have some cover images at item level and notice that they are correctly
displayed on the bibliographic record detail page.

Note that the slider does not work correctly. If you click on the dot
(so if you have several images for an item) the scrollbar is going to
hit the top of the page and the image won't change.
Could be reported separately if not done yet.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Martin Renvoize (ashimema) 2024-09-19 11:51:24 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant