Bug 17657

Summary: Item type's images could not be displayed correctly on the item types admin page
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: System AdministrationAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle, m.de.rooy, mtj
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 14828    
Bug Blocks:    
Attachments: Bug 17657: Fix locations of item types images
[SIGNED-OFF] Bug 17657: Fix locations of item types images
Bug 17657: Fix locations of item types images
Bug 17657: Fix locations of item types images

Description Jonathan Druart 2016-11-18 08:19:25 UTC
From the ML
https://lists.katipo.co.nz/pipermail/koha/2016-November/046616.html

> When trying to configure an icon for an item type, the chosen icon won't
> show in the Koha menu "Administration > Item types". I used to see the
> icon in the first column entitled "Image" - now this column is empty.
> Also the icon won't show in staff interface or OPAC.
Comment 1 Jonathan Druart 2016-11-18 08:26:53 UTC
Created attachment 57617 [details] [review]
Bug 17657: Fix locations of item types images

Koha::ItemType->image_location takes the interface in parameter or
default to OPAC.
From the item types admin page, we need to specify the intranet
interface to retrieve the correct image's url

Test plan:
Go on the item types admin page, see the source of the page and find the
image' urls.
=> Without this patch, they point to the OPAC
=> With this patch, the location is correct
Comment 2 Jonathan Druart 2016-11-18 08:28:02 UTC
This is caused by bug 14828.
Comment 3 Josef Moravec 2016-11-18 08:43:27 UTC
Created attachment 57618 [details] [review]
[SIGNED-OFF] Bug 17657: Fix locations of item types images

Koha::ItemType->image_location takes the interface in parameter or
default to OPAC.
From the item types admin page, we need to specify the intranet
interface to retrieve the correct image's url

Test plan:
Go on the item types admin page, see the source of the page and find the
image' urls.
=> Without this patch, they point to the OPAC
=> With this patch, the location is correct

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Marcel de Rooy 2016-11-18 13:10:06 UTC
Created attachment 57645 [details] [review]
Bug 17657: Fix locations of item types images

Koha::ItemType->image_location takes the interface in parameter or
default to OPAC.
From the item types admin page, we need to specify the intranet
interface to retrieve the correct image's url

Test plan:
Go on the item types admin page, see the source of the page and find the
image' urls.
=> Without this patch, they point to the OPAC
=> With this patch, the location is correct

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Marcel de Rooy 2016-11-18 13:10:29 UTC
Created attachment 57646 [details] [review]
Bug 17657: Fix locations of item types images

Koha::ItemType->image_location takes the interface in parameter or
default to OPAC.
From the item types admin page, we need to specify the intranet
interface to retrieve the correct image's url

Test plan:
Go on the item types admin page, see the source of the page and find the
image' urls.
=> Without this patch, they point to the OPAC
=> With this patch, the location is correct

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Kyle M Hall (khall) 2016-11-18 14:06:40 UTC
Pushed to master for 16.11, thanks Jonathan!
Comment 7 Mason James 2016-12-14 11:27:35 UTC
Pushed to 16.05.x, for 16.05.06 release