Created attachment 136756 [details] Screenshot - OPAC search showing <span> tags for Did you mean? In master, when "Did you mean?" is enabled <span> tags are exposed (see attached screenshot). To replicate: 1. Enable "Did you mean?": . go to Administration > Additional parameters > Did you mean? . put a tick in each plugin and save the configuration 2. In the OPAC, search for 'open source' This is showing only in master, and not in 22.05.x.
oops, it must be from bug 30733 ^^"
> This is showing only in master, and not in 22.05.x. We can expect it to be in 22.05.02 since it ships 30733.
Created attachment 137444 [details] [review] Bug 31069: fix <span> in OPAC search suggestions (Did you mean) == test plan == 1. Enable "Did you mean?": . go to Administration > Additional parameters > Did you mean? . put a tick in each plugin and save the configuration 2. In the OPAC, search for 'open source' 3. Without the patch you see escaped <span> after "Did you mean:"
Same fix as bug 30629
Created attachment 137446 [details] [review] Bug 31069: fix <span> in OPAC search suggestions (Did you mean) == test plan == 1. Enable "Did you mean?": . go to Administration > Additional parameters > Did you mean? . put a tick in each plugin and save the configuration 2. In the OPAC, search for 'open source' 3. Without the patch you see escaped <span> after "Did you mean:" Signed-off-by: David Nind <david@davidnind.com>
Created attachment 137698 [details] [review] Bug 31069: fix <span> in OPAC search suggestions (Did you mean) == test plan == 1. Enable "Did you mean?": . go to Administration > Additional parameters > Did you mean? . put a tick in each plugin and save the configuration 2. In the OPAC, search for 'open source' 3. Without the patch you see escaped <span> after "Did you mean:" Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
All works, PQA
Pushed to master for 22.11. Nice work everyone, thanks!
This broke tests: t/db_dependent/SuggestionEngine_ExplodedTerms.t Please fix ASAP.
Created attachment 137824 [details] [review] Bug 31069: Remove ExplodedTerms dependency on templates This patch removes the use of templates and CGI in ExplodedTerms by using the Koha::I18N library. The functionality on the package is too simple, and messing with the template paths complexity on the tests was too much, given we have a nice way to have translatable strings at the package level. This patch does that, and cleans up the test file as well, that required complex template and CGI mocking to run properly. To test: 1. Run: $ kshell k$ prove t/db_dependent/SuggestionEngine_ExplodedTerms.t => FAIL: It fails in master 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass 4. Follow the original test plan => SUCCESS: Things work 5. Enjoy the rest of the day and forget this ever happened Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Why did the patch broke SuggestionEngine_ExplodedTerms.t btw? I don't get it and might break other things if I use Koha::I18N in other places to clean up strings.
(In reply to Victor Grousset/tuxayo from comment #11) > Why did the patch broke SuggestionEngine_ExplodedTerms.t btw? I don't get it > and might break other things if I use Koha::I18N in other places to clean up > strings. It was probably a unique case in the codebase. A template that is used from a .pm file that didn't use get_template_and_user that also had really complex and fragile mocks in the tests...
wow thanks, no worries then ^^
Backported to 22.05.x for 22.05.05
Can't reproduce the bug on 21.11. feel free to ask if backport needed.
To spare testing time you can check the "Depends on:" field of the ticket. Here it links to bug 30733 which isn't in 21.11