Bug 30512 - Staff interface search results template error
Summary: Staff interface search results template error
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 29609
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-12 11:54 UTC by Owen Leonard
Modified: 2022-08-03 17:36 UTC (History)
3 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:
22.05.00


Attachments
Screenshot showing the problem (168.81 KB, image/png)
2022-04-12 12:06 UTC, Owen Leonard
Details
Bug 30512: Staff interface search results template error (4.71 KB, patch)
2022-04-12 12:07 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30512: Staff interface search results template error (4.78 KB, patch)
2022-04-21 14:56 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2022-04-12 11:54:01 UTC
Bug 29609 made a change to results.tt which result in broken markup:

 <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]" class => 'p1'>

biblio_a_href doesn't accept a "class" property.

The problem will only appear if you have IntranetCoce, AmazonCoverImages, or LocalCoverImages enabled.
Comment 1 Owen Leonard 2022-04-12 12:06:44 UTC
Created attachment 133210 [details]
Screenshot showing the problem
Comment 2 Owen Leonard 2022-04-12 12:07:17 UTC
Created attachment 133211 [details] [review]
Bug 30512: Staff interface search results template error

This patch removes some markup from the search results template which
was causing markup to be output on the screen. Rather than correct the
markup so that the "p1" class is correctly added to the relevant links
I'm removing it. The "p1" class isn't used anywhere.

The patch also corrects two incorrect template filters on one of the
page's links.

To test, apply the patch and enable the following system preferences:

- AmazonCoverImages
- IntranetCoce (if available)
- LocalCoverImages

- Perform a catalog search in the staff interface which will return
  results with cover images from each of the enabled services.
- The covers should show correctly in the search results with no markup
  being output on screen.
Comment 3 Jonathan Druart 2022-04-21 14:56:39 UTC
Created attachment 133571 [details] [review]
Bug 30512: Staff interface search results template error

This patch removes some markup from the search results template which
was causing markup to be output on the screen. Rather than correct the
markup so that the "p1" class is correctly added to the relevant links
I'm removing it. The "p1" class isn't used anywhere.

The patch also corrects two incorrect template filters on one of the
page's links.

To test, apply the patch and enable the following system preferences:

- AmazonCoverImages
- IntranetCoce (if available)
- LocalCoverImages

- Perform a catalog search in the staff interface which will return
  results with cover images from each of the enabled services.
- The covers should show correctly in the search results with no markup
  being output on screen.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2022-04-21 14:56:55 UTC
Oops, thanks Owen!
Comment 5 Fridolin Somers 2022-04-22 18:52:55 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 6 Kyle M Hall 2022-04-29 17:25:26 UTC
Not applying to 21.11.x, please rebase if you think this should be backported!