To recreate: 1. Turn on Coce for the OPAC. 2. OPACShelfBrowser must be on 3. Find a record that returns a cover image and open it's detail page. 4. Use the next/previous navigation links in the OPACShelfBrowser 5. Notice how everytime you click on a control an extra cover image is added to the biblio-cover-slider
Created attachment 149143 [details] [review] Bug 32412: Empty coce container before appending image To test: 1. Apply patch and clear browser cache 2. Turn on Coce for the OPAC. 3. OPACShelfBrowser must be on 4. Find a record that returns a cover image and open it's detail page. 5. Use the next/previous navigation links in the OPACShelfBrowser 6. Notice that no extra image is being added to the biblio-cover-slider. 7. Make sure that Coce images still load correctly in on the OPAC detail page, OPAC results page, and in the shelf browser.
Created attachment 149219 [details] [review] Bug 32412: Empty coce container before appending image To test: 1. Apply patch and clear browser cache 2. Turn on Coce for the OPAC. 3. OPACShelfBrowser must be on 4. Find a record that returns a cover image and open it's detail page. 5. Use the next/previous navigation links in the OPACShelfBrowser 6. Notice that no extra image is being added to the biblio-cover-slider. 7. Make sure that Coce images still load correctly in on the OPAC detail page, OPAC results page, and in the shelf browser. Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Works perfectly. Thanks!
Created attachment 150567 [details] [review] Bug 32412: Do not reload COCE image for biblio We do not want to fetch again the new image for the biblio record. We only want to fetch those for the shelf browser. Note that the third parameter 'covernewwindow' was not used.
Lucas, your patch is working but I think it's actually hiding another bug: we should not reload the image for the bibliographic record when we are browsing the shelf. Do you agree with my follow-up patch?
(In reply to Jonathan Druart from comment #5) > Lucas, your patch is working but I think it's actually hiding another bug: > we should not reload the image for the bibliographic record when we are > browsing the shelf. > > Do you agree with my follow-up patch? yes
Created attachment 150620 [details] [review] Bug 32412: Do not reload COCE image for biblio We do not want to fetch again the new image for the biblio record. We only want to fetch those for the shelf browser. Note that the third parameter 'covernewwindow' was not used. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 150625 [details] [review] Bug 32412: Empty coce container before appending image To test: 1. Apply patch and clear browser cache 2. Turn on Coce for the OPAC. 3. OPACShelfBrowser must be on 4. Find a record that returns a cover image and open it's detail page. 5. Use the next/previous navigation links in the OPACShelfBrowser 6. Notice that no extra image is being added to the biblio-cover-slider. 7. Make sure that Coce images still load correctly in on the OPAC detail page, OPAC results page, and in the shelf browser. Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 150626 [details] [review] Bug 32412: Do not reload COCE image for biblio We do not want to fetch again the new image for the biblio record. We only want to fetch those for the shelf browser. Note that the third parameter 'covernewwindow' was not used. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.05. Nice work everyone, thanks!
Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release
I'm not seeing any images in the shelf browser after this patch. In the console I see "Uncaught TypeError: parent.find is not a function" from coce.js
Backported to 22.05.x for upcoming 22.05.14
Not backporting to 21.11.x
(In reply to Owen Leonard from comment #12) > I'm not seeing any images in the shelf browser after this patch. In the > console I see "Uncaught TypeError: parent.find is not a function" from > coce.js Same here on 22.11. Can't say yet on 23.05.
(In reply to Frédéric Demians from comment #15) > (In reply to Owen Leonard from comment #12) > > I'm not seeing any images in the shelf browser after this patch. In the > > console I see "Uncaught TypeError: parent.find is not a function" from > > coce.js > > Same here on 22.11. Can't say yet on 23.05. Seen bug 33848?
(In reply to Jonathan Druart from comment #16) > Seen bug 33848? No, but I should have, since it's the solution. Thanks.