https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40394
--- Comment #3 from Frédéric Demians <[email protected]> --- Created attachment 207685 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207685&action=edit Bug 40394: Keep Coce cover images when Coce answers slowly Related to previous patch. If OPAC result page display a lot of biblio record, more than 100, Code will take time to responds. Let see how... The OPAC waits at most 5 seconds for cover images After this delay, it verifies the cover containers and removes those without an image. When Coce answers later, for example for covers it doesn't have in its cache yet, containers are already gone => no Coce cover is displayed. This patch verifies a container waiting for Coce once Coce has answered and the images it gave are loaded, instead of removing it. Other containers are verified as before. What's new in KOHA.coce : - loaded: a promise settled when all getURL() calls are finished - isPending(container): whether a Coce thumbnail is still waiting - whenLoaded(container): settles when Coce has answered and the container's Coce images are loaded verify_cover_images() verifies each container with a new verify_cover_slider() function. TEST PLAN / default KTD instance / MARC21 : 0. Set OPACnumSearchResults to 200. 1. Enable Coce: - OpacCoce: Enable - CoceProviders: check Amazon, Google Books and Open Library - CoceHost: https://coce.tamil.fr/delay/8000 (Coce answers after 8 seconds, longer than the 5 seconds the OPAC waits for cover images) 2. In the OPAC, search for "the" (it returns records with an ISBN). 3. Wait 10 seconds => No cover image from Coce is displayed. 4. Open the detail page of a record with an ISBN, e.g. /cgi-bin/koha/opac-detail.pl?biblionumber=70, and wait 10 seconds. => No cover image is displayed. 5. Apply the patch, then reload both pages (force browser cache reste to get new coce.js) 6. Repeat 2. Wait 10 seconds on each page. => Covers are displayed on the results page and the detail page, about 8 seconds after the page has loaded. 7. Set CoceHost back to https://coce.tamil.fr and reload both pages. => Covers are displayed right away, as before the patch. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
