There is a stanza in searchResults that was commented as being unused - it appears to still be used in one scenario. If we don't wish to remove the non-xslt view for opac results at this time we can at least prevent some processing
Created attachment 93085 [details] [review] Bug 23663: Only process itemtype summary if using non-xslt opac results To test: 1 - Set OpacXSLTResultsDisplay to "" to use non-xslt view 2 - In Administration->Itemtypes define a summary for an itemtype: This is the summary for [245a] 3 - Perform a search on the opac that will return results with this itemtype 4 - Note "This is the summary" appears in results with the title 5 - Set OPACXSLTResultsDisplay to 'default' 6 - Refresh your search results, note the summary disappears 7 - Try search in other places and note that summary never appears 8 - Apply patch 9 - Repeat 1-7 and note nothing changed
Note: you also need to have an itemtype on record level. And there are some display issues witht he feature, it will print out line breaks (filters suspected): The Thirty Years War :<br/>
Created attachment 93135 [details] [review] Bug 23663: Only process itemtype summary if using non-xslt opac results To test: 1 - Set OpacXSLTResultsDisplay to "" to use non-xslt view 2 - In Administration->Itemtypes define a summary for an itemtype: This is the summary for [245a] 3 - Perform a search on the opac that will return results with this itemtype 4 - Note "This is the summary" appears in results with the title 5 - Set OPACXSLTResultsDisplay to 'default' 6 - Refresh your search results, note the summary disappears 7 - Try search in other places and note that summary never appears 8 - Apply patch 9 - Repeat 1-7 and note nothing changed Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
What about removing the code?
(In reply to Jonathan Druart from comment #4) > What about removing the code? I think that can be done, but separately, here we just don't process it unnecessarily The feature is a little bit interesting, and could be used in the future, but I think removal is its own bug
Created attachment 94827 [details] [review] Bug 23663: Only process itemtype summary if using non-xslt opac results To test: 1 - Set OpacXSLTResultsDisplay to "" to use non-xslt view 2 - In Administration->Itemtypes define a summary for an itemtype: This is the summary for [245a] 3 - Perform a search on the opac that will return results with this itemtype 4 - Note "This is the summary" appears in results with the title 5 - Set OPACXSLTResultsDisplay to 'default' 6 - Refresh your search results, note the summary disappears 7 - Try search in other places and note that summary never appears 8 - Apply patch 9 - Repeat 1-7 and note nothing changed Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Good sleuthing there Nick, Patch works as expected.. and I agree it would be nice to remove the code block entirely, but in a new bug. Passing QA
Nice work! Pushed to master for 19.11.00