Bug 34502 - Useless SEARCH_RESULT.localimage usage
Summary: Useless SEARCH_RESULT.localimage usage
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: David Cook
QA Contact: Victor Grousset/tuxayo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-09 01:05 UTC by David Cook
Modified: 2023-12-28 20:47 UTC (History)
2 users (show)

See Also:
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


Attachments
Bug 34502: Remove useless SEARCH_RESULT.localimage (2.17 KB, patch)
2023-08-09 01:07 UTC, David Cook
Details | Diff | Splinter Review
Bug 34502: Remove useless SEARCH_RESULT.localimage (2.22 KB, patch)
2023-09-04 20:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 34502: Remove useless SEARCH_RESULT.localimage (2.27 KB, patch)
2023-09-09 03:57 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

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