Bug 30512

Summary: Staff interface search results template error
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, kyle, testopia
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:
22.05.00
Bug Depends on: 29609    
Bug Blocks:    
Attachments: Screenshot showing the problem
Bug 30512: Staff interface search results template error
Bug 30512: Staff interface search results template error

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!