nextcloud / cms_pico

🗃 Integrate Pico CMS and let your users manage their own websites
https://apps.nextcloud.com/apps/cms_pico
GNU Affero General Public License v3.0
137 stars 43 forks source link

improve twig error logging #233

Open derMart opened 1 year ago

derMart commented 1 year ago

I noticed, that the nextcloud log does not include file number and line incase of a twig error. That makes development of themes very hard. This is an attempt to improve the situation.

PhrozenByte commented 1 year ago

Thank you for your contribution! :+1:

I was thinking, what do you think about adding a separate TwigErrorResponse (similar to PicoErrorResponse) with a separate twig.php template (similar to Pico's error.php) that shows this information directly to the website owner (and just the website owner), instead of just showing a generic error?

derMart commented 1 year ago

That would be really awesome. Even better if that error page also shows the complete stack trace (not just first file name and line number as in this pr). Problem is, I don't have any time to do that ... at least not at the moment. Just one remark: if such error page is implemented I would find it valueable for an error still to appear inside nextcloud.log, so that it is persistent. So maybe gradually improve things, starting with this simple PR?