Bug 16143

Summary: Wrong icon PATH on virtualshelves
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: OPACAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: brendan, julian.maurice, katrin.fischer
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14544    
Bug Blocks:    
Attachments: Bug 16143: Make opac-shelves.pl generate OPAC itype images path
Bug 16143: Make opac-shelves.pl generate OPAC itype images path
[PASSED QA] Bug 16143: Make opac-shelves.pl generate OPAC itype images path

Description Tomás Cohen Arazi 2016-03-24 02:42:11 UTC
To reproduce:
- On current master/3.22.x
- Have some itemtypes with icons set
- Have some biblios matching the itemtypes
- Add them to a public list
- Do a search in the OPAC for any of those biblios
=> SUCCESS: icons show correctly
- Choose the list
=> FAIL: icons fail to show, URL points to /intranet-tmpl/....
Comment 1 Tomás Cohen Arazi 2016-03-24 02:46:33 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2016-03-24 05:05:30 UTC
Comment on attachment 49501 [details] [review]
Bug 16143: Make opac-shelves.pl generate OPAC itype images path

Review of attachment 49501 [details] [review]:
-----------------------------------------------------------------

::: opac/opac-shelves.pl
@@ +259,4 @@
>                  }
>  
>                  my $marcflavour = C4::Context->preference("marcflavour");
> +                my $itemtypeinfo = getitemtypeinfo( $content->biblionumber->biblioitems->first->itemtype, 'opac' );

Oooo... good catch.
Comment 3 Mark Tompsett 2016-03-24 05:25:05 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2016-03-24 06:03:10 UTC
Patch is obviously right and display of the icon is ok. Testing without the patch I noticed that the icon was displaying for me as well (git installation, using a bridge icon).

I think the display for item types without icons needs to be corrected  (separately). It shows the description twice in these cases and should probably show nothing or the description only once.
Comment 5 Katrin Fischer 2016-03-24 06:03:54 UTC
Created attachment 49510 [details] [review]
[PASSED QA] Bug 16143: Make opac-shelves.pl generate OPAC itype images path

This patch makes icons point to the OPAC path instead of intranet's.

To test:
- On current master/3.22.x
- Have some itemtypes with icons set
- Have some biblios matching the itemtypes
- Add them to a public list
- Do a search in the OPAC for any of those biblios
=> SUCCESS: icons show correctly
- Choose the list
=> FAIL: icons fail to show, URL points to /intranet-tmpl/....
- Apply the patch, reload
=> SUCCESS: icons show correctly
- Sign off :-D

Sponsored-by: American Numismatic Society

NOTE: I had to set item-level_itypes to 'biblio record'
      in order to trigger this. My icon's showed, but the
      path was wrong. This patch corrects it.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Brendan Gallagher 2016-03-24 15:35:10 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!
Comment 7 Julian Maurice 2016-04-07 07:56:46 UTC
Patch pushed to 3.22.x, will be in 3.22.6