netgen-layouts/layouts-core

Rendering backend exceptions and Twig errors in debug mode

Closed this issue · 3 comments

Hi!

This is just an idea. I think it's actually 2 separate (but related things). Both relate to what happens when you make a coding mistake, and the result is that something "doesn't work" while in the layouts admin.

A) If any Ajax call fails with a 500 error, it'd be cool (in debug mode at least) to render the full exception in a modal. I did this recently - you could re-use the code: symfony/ux#467

B) In some cases, if you have an error in Twig, the error is hidden entirely. I think this is to avoid error in production from a user error. But, for example, when creating the "preview" template for a content browser, any mistake I made in that Twig template wasn't shown to me. It'd be awesome to ALLOW the error to be thrown in debug mode and, along with (A), show it to the user.

Cheers!

Hi @weaverryan

I remembered that we actually had this feature from the start, but due to a bug which I investigated today, it did not show up.

The error popup looks like this:

image

This still does not solve the content browser preview issue. I will try to implement your suggestion with the popup there.

Thanks!

I started seeing this and I really like it. Thanks!

Closing as this is now working again in Layouts!