plone / cookieplone-templates

Plone templates used with cookieplone
MIT License
1 stars 0 forks source link

No output for failed sanity checks #93

Closed davisagli closed 2 hours ago

davisagli commented 6 hours ago

Various cookieplone templates include sanity checks / validation in hooks before they run.

When running as a sub-template using cookieplone.generator.generate_subtemplate, output is suppressed. As a result, the user only sees an unhelpful message like "Pre-Prompt Hook script failed" and can't see what happened.

I'd suggest we instead store output in a buffer, and then if the subtemplate fails we can output the buffer for debugging purposes.

davisagli commented 2 hours ago

Wrong diagnosis. The actual problem here is that the templates which do sanity checks don't output the result of the checks.