Bug 21731 - t::lib::QA::TemplateFilters missing built-in TT filter "xml" causes false warnings
Summary: t::lib::QA::TemplateFilters missing built-in TT filter "xml" causes false war...
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on: 21393
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-31 07:05 UTC by David Cook
Modified: 2024-11-07 08:59 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 21731: Try to fix filter detection in QA script for xml filter (1.15 KB, patch)
2024-11-01 01:50 UTC, David Cook
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2018-10-31 07:05:49 UTC
I'm getting the following warning from the QA script:

missing_filter at line 15 (                        <div style="white-space:pre">[% record | xml %]</div>)

I clearly do have an xml filter there. Josef has said it's because it's missing from t::lib::QA::TemplateFilters.
Comment 1 Josef Moravec 2018-10-31 07:10:01 UTC
There another question on top of this: Do we wan't to enable all built-in template toolkit filters by default? And so add them to test?

http://template-toolkit.org/docs/manual/Filters.html
Comment 2 David Cook 2022-12-06 06:36:07 UTC
Closing this due to age
Comment 3 Jonathan Druart 2022-12-06 07:14:29 UTC
Reopening, if it's still valid we should fix it.
Comment 4 David Cook 2024-11-01 01:48:05 UTC
(In reply to Jonathan Druart from comment #3)
> Reopening, if it's still valid we should fix it.

I just did a quick test and it looks like it's still valid:

 FAIL   koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
   FAIL   filters
                missing_filter at line 17 (<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | xml %][% ELSE %]Koha online[% END %] catalog</title>)

However, it's not 100% clear to me how to fix this one.

I can write a patch which fixes this problem, but there might be other places in the script that need updating too? I don't know.
Comment 5 David Cook 2024-11-01 01:50:21 UTC
Created attachment 173850 [details] [review]
Bug 21731: Try to fix filter detection in QA script for xml filter

This change adds support for the "xml" filter to the QA script.

Test plan:
1. Change a "html" filter in opac-main.tt to use "xml" instead,
    and temporarily commit your change
2. Run "qa" script
3. Notice it fails

4. Apply the BZ patch

5. Run "qa" script
6. Note that it passes now
7. Sign off the BZ patch and only upload it (and not your temporary
    commit which you can delete after)
Comment 6 Jonathan Druart 2024-11-07 08:58:55 UTC
(In reply to Josef Moravec from comment #1)
> There another question on top of this: Do we wan't to enable all built-in
> template toolkit filters by default? And so add them to test?
> 
> http://template-toolkit.org/docs/manual/Filters.html

Valid question, why 'xml'? We don't use it.
Comment 7 Jonathan Druart 2024-11-07 08:59:26 UTC
The comment is incorrect.