Bug 31034

Summary: Cover images hidden in some browsers
Product: Koha Reporter: Sara Brown <sbrown>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: alexbuckley, dhd.koha, lucas
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31464
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:

Description Sara Brown 2022-06-23 20:35:46 UTC
Hiding the Content type line in opacusercss with 

#content_type {
  display: none;
}

somehow is causing the bib image to also be hidden once the page reloads. It doesn't show even if the code is removed but does display again if the cache is cleared. Hiding LOC and DDC details didn't affect the image in this way.
Comment 1 Lucas Gass (lukeg) 2022-06-23 21:30:58 UTC
(In reply to Sara Brown from comment #0)
> Hiding the Content type line in opacusercss with 
> 
> #content_type {
>   display: none;
> }

I think this CSS is a red herring. 

Whats is happening for me, on the OPAC detail page, is this:

1. Turn on Coce and all the image providers
2. Enable Coce for the OPAC
3. Go to a results set and choose a record that clearly shows an image on the results page. 
4. Now click on that records detail page, you may see the '#biblio-cover-slider' appear for a second before it disappears. If you have to clear your cache, and reload. 
5. View the page source. The #biblio-cover-slider element is present in the source but has been removed when you inspect with your browsers dev tools.
Comment 2 Owen Leonard 2022-06-24 13:15:06 UTC
There must be more to the circumstances leading to this... I'm not able to reproduce it.
Comment 3 Lucas Gass (lukeg) 2022-06-24 14:00:11 UTC
(In reply to Owen Leonard from comment #2)
> There must be more to the circumstances leading to this... I'm not able to
> reproduce it.

Ah yes, upon further testing I notice that this problem only happens for me in Firefox. 

Owen, were you using Chrome while testing?
Comment 4 Owen Leonard 2022-06-24 16:35:40 UTC
(In reply to Lucas Gass from comment #3)
> Owen, were you using Chrome while testing?

No, Firefox (102.0b9, macOS)
Comment 5 grharry 2022-07-11 15:41:03 UTC
I don't know if this applies to this bug. 

I have the same problem on all browsers except vivaldi, from version 21.11+ !

It seems like a timeout+synchronization problem. 

Thus 

for opac edit _language_code_/modules/opac_detail.tt  near line 1589 

increase the 100 timeout value to your needs, 

window.setTimeout(function(){wait_for_images(cb);}, 100);

replace 100 by a value that works for your needs 500 - 1000 or more! 

So far cannot locate the particular code for staff interface. 

Staff interface does not show the coce cover on any browser except vivaldi! 

Regards, 
Harry.
Comment 6 Lucas Gass (lukeg) 2023-02-24 16:36:55 UTC
I think that this problem has been fixed by Bug 32307. Marking this as resolved.