Bug 22425

Summary: Icons directory broken on OPAC interface
Product: Koha Reporter: Doug Kingston <dpk>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P2    
Version: 18.11   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Modified XSL file

Description Doug Kingston 2019-02-27 16:52:56 UTC
Version: 18.11.03 (just upgraded)
OPAC theme: bootstrap
OPAC Fallback theme: prog

After upgrading to 18.11.03 using the debian packages on February 25th, we noticed the icons on search results were broken (the image did not load).  Search results in the admin interface displayed properly.  Looking at the image reference in the HTML, I found the file reference went and looked at the filesystem.

As an example, the book icon was supposed to be:
<img src="/opac-tmpl/lib/famfamfam/silk/book.png" alt="book" title="book" class="materialtype">

The broken OPAC directory has no silk subdirectory and the only book appears to be book_previous.png which suggests this directory was in the midst of manipulation when the package was built:

/usr/share/koha/opac/htdocs/opac-tmpl/lib/famfamfam:
total 176
drwxr-xr-x 2 root root 4096 Feb 25 10:22 .
drwxr-xr-x 5 root root 4096 Jun 11  2018 ..
-rw-r--r-- 1 root root  622 Feb 25 03:24 AR.png
-rw-r--r-- 1 root root  345 Feb 25 03:24 arrow_left.png
-rw-r--r-- 1 root root  685 Feb 25 03:24 arrow_refresh.png
-rw-r--r-- 1 root root  593 Feb 25 03:24 BK.png
-rw-r--r-- 1 root root  680 Feb 25 03:24 book_previous.png
-rw-r--r-- 1 root root  675 Feb 25 03:24 calendar.png
-rw-r--r-- 1 root root  587 Feb 25 03:24 cancel.png
-rw-r--r-- 1 root root  673 Feb 25 03:24 cd.png
-rw-r--r-- 1 root root  620 Feb 25 03:24 CF.png
-rw-r--r-- 1 root root  710 Feb 25 03:24 chart_curve.png
-rw-r--r-- 1 root root  666 Feb 25 03:24 controller.png
-rw-r--r-- 1 root root  655 Feb 25 03:24 cross.png
-rw-r--r-- 1 root root  390 Feb 25 03:24 database.png
-rw-r--r-- 1 root root  686 Feb 25 03:24 drive_web.png
-rw-r--r-- 1 root root  764 Feb 25 03:24 dvd.png
-rw-r--r-- 1 root root  567 Feb 25 03:24 font.png
-rw-r--r-- 1 root root  606 Feb 25 03:24 GR.png
-rw-r--r-- 1 root root  786 Feb 25 03:24 help.png
-rw-r--r-- 1 root root  343 Feb 25 03:24 link.png
-rw-r--r-- 1 root root  615 Feb 25 03:24 magnifier.png
-rw-r--r-- 1 root root  760 Feb 25 03:24 MM.png
-rw-r--r-- 1 root root  804 Feb 25 03:24 MP.png
-rw-r--r-- 1 root root  610 Feb 25 03:24 MU.png
-rw-r--r-- 1 root root  760 Feb 25 03:24 MX.png
-rw-r--r-- 1 root root  500 Feb 25 03:24 note.png
-rw-r--r-- 1 root root  825 Feb 25 03:24 OB.png
-rw-r--r-- 1 root root  548 Feb 25 03:24 paintbrush.png
-rw-r--r-- 1 root root  450 Feb 25 03:24 pencil.png
-rw-r--r-- 1 root root  704 Feb 25 03:24 pictures.png
-rw-r--r-- 1 root root  385 Feb 25 03:24 PR.png
-rw-r--r-- 1 root root   53 Feb 25 03:24 readme.txt
-rw-r--r-- 1 root root  649 Feb 25 03:24 report.png
-rw-r--r-- 1 root root  748 Feb 25 03:24 script.png
-rw-r--r-- 1 root root  658 Feb 25 03:24 SE.png
-rw-r--r-- 1 root root  700 Feb 25 03:24 stop.png
-rw-r--r-- 1 root root  789 Feb 25 03:24 ST.png
-rw-r--r-- 1 root root  452 Feb 25 03:24 TD.png
-rw-r--r-- 1 root root  344 Feb 25 03:24 text_list_bullets.png
-rw-r--r-- 1 root root  741 Feb 25 03:24 user.png
-rw-r--r-- 1 root root  653 Feb 25 03:24 VM.png
-rw-r--r-- 1 root root  957 Feb 25 03:24 world_link.png
-rw-r--r-- 1 root root  923 Feb 25 03:24 world.png

The working Admin interface has a different directory content:

/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/img/famfamfam/:
total 64
drwxr-xr-x 3 root root 4096 Feb 25 10:22 .
drwxr-xr-x 5 root root 4096 Feb 25 10:22 ..
-rw-r--r-- 1 root root  622 Feb 25 03:24 AR.png
-rw-r--r-- 1 root root  593 Feb 25 03:24 BK.png
-rw-r--r-- 1 root root  620 Feb 25 03:24 CF.png
-rw-r--r-- 1 root root  606 Feb 25 03:24 GR.png
-rw-r--r-- 1 root root  760 Feb 25 03:24 MM.png
-rw-r--r-- 1 root root  804 Feb 25 03:24 MP.png
-rw-r--r-- 1 root root  610 Feb 25 03:24 MU.png
-rw-r--r-- 1 root root  760 Feb 25 03:24 MX.png
-rw-r--r-- 1 root root  385 Feb 25 03:24 PR.png
-rw-r--r-- 1 root root  658 Feb 25 03:24 SE.png
drwxr-xr-x 2 root root 4096 Feb 25 10:22 silk
-rw-r--r-- 1 root root  789 Feb 25 03:24 ST.png
-rw-r--r-- 1 root root  452 Feb 25 03:24 TD.png
-rw-r--r-- 1 root root  653 Feb 25 03:24 VM.png

/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/img/famfamfam/silk:
total 72
drwxr-xr-x 2 root root 4096 Feb 25 10:22 .
drwxr-xr-x 3 root root 4096 Feb 25 10:22 ..
-rw-r--r-- 1 root root  789 Feb 25 03:24 book_link.png
-rw-r--r-- 1 root root  622 Feb 25 03:24 book_open.png
-rw-r--r-- 1 root root  593 Feb 25 03:24 book.png
-rw-r--r-- 1 root root  675 Feb 25 03:24 calendar.png
-rw-r--r-- 1 root root  792 Feb 25 03:24 computer_link.png
-rw-r--r-- 1 root root  655 Feb 25 03:24 cross.png
-rw-r--r-- 1 root root  666 Feb 25 03:24 error.png
-rw-r--r-- 1 root root  653 Feb 25 03:24 film.png
-rw-r--r-- 1 root root  804 Feb 25 03:24 map.png
-rw-r--r-- 1 root root  385 Feb 25 03:24 music.png
-rw-r--r-- 1 root root  658 Feb 25 03:24 newspaper.png
-rw-r--r-- 1 root root  591 Feb 25 03:24 page_white_acrobat.png
-rw-r--r-- 1 root root  603 Feb 25 03:24 page_white_code.png
-rw-r--r-- 1 root root  663 Feb 25 03:24 page_white_excel.png
-rw-r--r-- 1 root root  760 Feb 25 03:24 report_disk.png
-rw-r--r-- 1 root root  610 Feb 25 03:24 sound.png
Comment 1 Owen Leonard 2019-02-27 17:45:18 UTC
Do you have custom XSLT specified in your  OPACXSLT* system preferences? If you previously copied the default XSLT so that you could customize it, the paths to the icons will be incorrect.
Comment 2 Doug Kingston 2019-02-27 18:55:08 UTC
Increased the priority to P2 until triaged.  Need to see if this is a real problem in the most recent packages and might impact other users upgrading.
Comment 3 Doug Kingston 2019-02-27 18:56:18 UTC
(In reply to Owen Leonard from comment #1)
> Do you have custom XSLT specified in your  OPACXSLT* system preferences? If
> you previously copied the default XSLT so that you could customize it, the
> paths to the icons will be incorrect.

I will check and get back.
Comment 4 Katrin Fischer 2019-02-27 18:58:09 UTC
(In reply to Doug Kingston from comment #2)
> Increased the priority to P2 until triaged.  Need to see if this is a real
> problem in the most recent packages and might impact other users upgrading.

Hi Doug, we don't use the first pull down of priority, only the second one. Changing from enhancement to normal until confirmed.

Please check if you are using custom XSLT like Owen suggests first, it's most likely to be the issue. The files have been moved on purpose and the standard XSLT adapted, but custom we can't change.
Comment 5 Doug Kingston 2019-02-27 19:08:39 UTC
Created attachment 85796 [details]
Modified XSL file
Comment 6 Doug Kingston 2019-02-27 19:14:46 UTC
We did modify OPACXSLTListsDisplay and OPACXSLTResultsDisplay to point at a slightly modified version of MARC21slim2OPACResults.xsl (Copy attached). I see the issue now and we will need to re-adopt our changes to the updated .xsl files.