[Bug 35647] New: Coce images won't load on the staff results page
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 Bug ID: 35647 Summary: Coce images won't load on the staff results page Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com To recreate: 1. Turn on all CoceProviders and IntranetCoce. 2. Set CoceHost to 'https://coce.bywatersolutions.com' 3. Do a search and notice that no Coce images load on the results page. 4. In intranet-tmpl/js/coce.js add a debug line inside the `$("[id^=coce-thumbnail]").each(function() {` loop. 5. Nothing happens! This div is being prematurely removed via intranet-tmpl/prog/js/pages/results.js I don't think it is safe to remove the Coce div's without first knowing that KOHA.coce is finished. In results.js: 102 $(window).load(function() { 103 verify_cover_images(); 104 }); Just using a window load is not good enough. We either need to not remove the div ( hiding it is safer ) or we need to use a callback, promise, or async/await. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- There is a wait_for_images() callback used elsewhere, it seems like we need it here too. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 160279 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160279&action=edit Bug 35647: Use callback when waiting for Coce to load 1. Turn on all CoceProviders and IntranetCoce. 2. Set CoceHost to 'https://coce.bywatersolutions.com' 3. Do a search and notice that no Coce images load on the results page. 4. Apply patch, clear browser cache and try again. 5. Images should load. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160279|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 160280 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160280&action=edit Bug 35647: Use callback when waiting for Coce to load 1. Turn on all CoceProviders and IntranetCoce. 2. Set CoceHost to 'https://coce.bywatersolutions.com' 3. Do a search and notice that no Coce images load on the results page. 4. Apply patch, clear browser cache and try again. 5. Images should load. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Status|Signed Off |Failed QA --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- If Coce is disabled you are going to wait 5 seconds, always! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 161616 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161616&action=edit Bug 35647: (follow-up) Ensure Coce is on -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- if (!loaded && counter_wait < 50) {// Do not wait more than 5 seconds window.setTimeout(function(){wait_for_images(cb);}, 100); } else { if (counter_wait >= 50 ) { console.log("Could not retrieve the images") } cb(); } Shouldnt you differentiate loaded is true and !loaded && counter_wait > 50 ? Now you always go the callback? $(window).load(function() { if ( PREF_IntranetCoce && PREF_CoceProviders ) { wait_for_images(verify_cover_images); } }); What about the other source of images? Amazon or whatever? Is that condition really correct? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- This is more bug than enhancement. COCE is very useful :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- Duplicate of bug 32542? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=32542 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35647 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|Failed QA |RESOLVED --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- *** This bug has been marked as a duplicate of bug 32542 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org