Bug 16143 - Wrong icon PATH on virtualshelves
Summary: Wrong icon PATH on virtualshelves
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 14544
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-24 02:42 UTC by Tomás Cohen Arazi
Modified: 2016-12-05 21:25 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16143: Make opac-shelves.pl generate OPAC itype images path (1.54 KB, patch)
2016-03-24 02:46 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16143: Make opac-shelves.pl generate OPAC itype images path (1.75 KB, patch)
2016-03-24 05:25 UTC, M. Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 16143: Make opac-shelves.pl generate OPAC itype images path (1.82 KB, patch)
2016-03-24 06:03 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 M. 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 M. 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