]> git.koha-community.org Git - koha.git/commit
Bug 35676: Fix DidYouMean when not configured
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 12 Jan 2024 12:46:50 +0000 (13:46 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 17 Jan 2024 09:40:48 +0000 (10:40 +0100)
commit3429380bf55862a78660ba0885c1f7dc92237dd9
tree0ebd4848d25cfc384ac305c9318879d809afd86e
parent95ed5002721db9bc957116149a6bc8454b06a7c4
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&amp;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@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ae8c96f387997b70b32809f30dedb44d0e170711)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt