Products.PageTemplate.Extensions.find_bad_templates() is a very handy tool!
However, it would be great to have two improvements:
-
It should be able to check Filesystem Page Templates too
ie set obj_metatypes from ('Page Template',) to
('Page Template', 'Filesystem Page Template')
-
It should display HTML Tags on "Page Template scan results" page
Currently the web report looks like this:
form.pt
Compilation failed
chameleon.exc.ParseError: Unexpected end tag.
- String: ""
- Filename: /bachtest/form.pt
- Location: (line 13: col 25)
- Source: WEITERE_KONTAKTPERS
^^^^^^
But it should look like this:
form.pt
Compilation failed
chameleon.exc.ParseError: Unexpected end tag.
- String: "</DIV>"
- Filename: /bachtest/form.pt
- Location: (line 13: col 25)
- Source: WEITERE_KONTAKTPERS</DIV>
^^^^^^
ie, just quote < to < in the error string
errs = [err.replace('<', '<') for err in pt._v_errors]
I will make a pull request...
Products.PageTemplate.Extensions.find_bad_templates()is a very handy tool!However, it would be great to have two improvements:
It should be able to check Filesystem Page Templates too
ie set obj_metatypes from ('Page Template',) to
('Page Template', 'Filesystem Page Template')
It should display HTML Tags on "Page Template scan results" page
Currently the web report looks like this:
But it should look like this:
ie, just quote
<to<in the error stringI will make a pull request...