[Bug 30330] New: Bad fields within comments in a HTML notice still cause a crash
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30330 Bug ID: 30330 Summary: Bad fields within comments in a HTML notice still cause a crash Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org I had something like this in a notice: <!-- [% table.unkown_field %] --> The table is linked to a valid Koha object. The field is wrong. Running Print slip from within circ/article-requests caused a crash like: ERROR PROCESSING TEMPLATE: undef error - The method Koha::<<TABLE>>-><<UNKNOWN_FIELD>> is not covered by tests! While this is within a comment, I did not hope to see that. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30330 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #0)
Running Print slip from within circ/article-requests caused a crash like:
Yes it was article_requests.toc_request :) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30330 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #1)
(In reply to Marcel de Rooy from comment #0)
Running Print slip from within circ/article-requests caused a crash like:
Yes it was article_requests.toc_request :)
And not present in that database. But it just serves as an example that fields within comments are evaluated. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30330 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- As a side note (lowering the severity a bit): You could also try [%# bad stuff %], this works at least partially as long as the bad stuff does not contain %] which would end the comment. And for fun, as a crazy workaround, you could replace an ending %] by %][%# resulting in for instance: [%# <p>TOC: [% IF article_request.toc_request %][%#<strong>Include TOC</strong>[% ELSE %][%#No[% END %] It works, but serves as a 'good' example of a bad workaround. Should we call this a Template Toolkit bug or what? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30330 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think if you use HTML comments, it will still get parsed by TT and that is intentional. It allows you to put things into the templates that are only visible in source, like maybe our TEMPLATE FILE comment in the OPAC. You would have to use a TT comment if you didn't want it to show up in the code/being parsed at all. I believe this is not a bug, but working as intended. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org