[Koha-bugs] [Bug 35676] OPAC search results - link for "Check for suggestions" generates a blank page

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 12 15:25:31 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35676

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #160962|0                           |1
        is obsolete|                            |

--- Comment #4 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 160970
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160970&action=edit
Bug 35676: Fix DidYouMean when not configured

When DidYouMean is not configured, there is the following message
displayed:
  "Not what you expected? Check for suggestions"
suggestions is a link to svc/suggestion which does not return content if
the feature is displayed
 90 unless ( @plugins ) {
 91     print $query->header;
 92     exit;
 93 }

We should not see this text, it is supposed to be replaced when the ft
is enabled.

However
  commit 79bf4485c1b2ae8059e2ee15ea1e67bba9961c34
  Bug 34866: Use template wrapper for breadcrumbs: OPAC part 4
made this change:
-                    [% IF ( DidYouMean ) %]
+                    [% #IF ( DidYouMean ) %]
                         <div id="didyoumean">Not what you expected? Check for
<a href="/cgi-bin/koha/svc/suggestion?render=standalone&q=[% querystring |
uri %]">suggestions</a></div>
-                    [% END %]
+                    [% #END %]

Which is obviously wrong.

Test plan:
Do not have the ft configured and launch a search (OPAC) that will not
return any results.
=> Without this patch there is the message
=> With this patch applied it is no longer displayed

Signed-off-by: Owen Leonard <oleonard at myacpl.org>

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list