Bug 34502

Summary: Useless SEARCH_RESULT.localimage usage
Product: Koha Reporter: David Cook <dcook>
Component: TemplatesAssignee: David Cook <dcook>
Status: CLOSED FIXED QA Contact: Victor Grousset/tuxayo <victor>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers, victor
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:
23.11.00,23.05.04,22.11.10
Circulation function:
Attachments: Bug 34502: Remove useless SEARCH_RESULT.localimage
Bug 34502: Remove useless SEARCH_RESULT.localimage
Bug 34502: Remove useless SEARCH_RESULT.localimage

Description David Cook 2023-08-09 01:05:44 UTC
In ./koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt the following line is useless:

[% SEARCH_RESULT.localimage | html %]

This hash key doesn't exist so it just renders nothing.
Comment 1 David Cook 2023-08-09 01:07:53 UTC
Created attachment 154325 [details] [review]
Bug 34502: Remove useless SEARCH_RESULT.localimage

This patch removes a useless Template Toolkit tag.

To test:
0. Apply the patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=LocalCoverImages
2. Change to "Show"
3. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
4. Upload an image
5. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
6. Note that the local cover image appears even without the TT tag
Comment 2 David Nind 2023-09-04 20:51:27 UTC
Created attachment 155204 [details] [review]
Bug 34502: Remove useless SEARCH_RESULT.localimage

This patch removes a useless Template Toolkit tag.

To test:
0. Apply the patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=LocalCoverImages
2. Change to "Show"
3. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
4. Upload an image
5. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
6. Note that the local cover image appears even without the TT tag

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Victor Grousset/tuxayo 2023-09-08 20:05:29 UTC
It comes from Bug 25846
And looks like a typo in trying to use localimages
Because found no relevant "localimage" in the diffs or all the commits of Koha (thanks `git log -p` and ripgrep to grep that)

But at the time of 25846 and now, localimage is only in
opac/opac-detail.pl
catalogue/detail.pl

Anyway, it's not working since it's introduction in 21.05 so it being a typo doesn't warrant digging more into. 
Stuff was always dead and nobody complained ^^

Code looks good :) Just need to test.
Comment 4 Victor Grousset/tuxayo 2023-09-09 03:57:49 UTC
Created attachment 155470 [details] [review]
Bug 34502: Remove useless SEARCH_RESULT.localimage

This patch removes a useless Template Toolkit tag.

To test:
0. Apply the patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=LocalCoverImages
2. Change to "Show"
3. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
4. Upload an image
5. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
6. Note that the local cover image appears even without the TT tag

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2023-09-09 03:58:19 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 6 Tomás Cohen Arazi (tcohen) 2023-09-12 13:16:43 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-09-14 18:28:01 UTC
Pushed to 23.05.x for 23.05.04
Comment 8 Matt Blenkinsop 2023-09-15 10:22:02 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x