| Summary: | Coce images won't load on the staff results page | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Lucas Gass (lukeg) <lucas> |
| Component: | Circulation | Assignee: | Lucas Gass (lukeg) <lucas> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Marcel de Rooy <m.de.rooy> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | david, fridolin.somers, gmcharlt, jonathan.druart, kyle, m.de.rooy |
| Version: | Main | Keywords: | regression |
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32542 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Attachments: |
Bug 35647: Use callback when waiting for Coce to load
Bug 35647: Use callback when waiting for Coce to load Bug 35647: (follow-up) Ensure Coce is on |
||
|
Description
Lucas Gass (lukeg)
2023-12-22 21:39:27 UTC
There is a wait_for_images() callback used elsewhere, it seems like we need it here too. Created attachment 160279 [details] [review] 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. Created attachment 160280 [details] [review] 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> If Coce is disabled you are going to wait 5 seconds, always! Created attachment 161616 [details] [review] Bug 35647: (follow-up) Ensure Coce is on 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?
This is more bug than enhancement. COCE is very useful :D |