Skip to content

include asset again into error pages #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eschultz-magix opened this issue Jan 16, 2019 · 4 comments
Closed

include asset again into error pages #31

eschultz-magix opened this issue Jan 16, 2019 · 4 comments

Comments

@eschultz-magix
Copy link

Symfony version(s) affected: 4.2

Description
The EntrypointLookup prevents including a file multiple times by default. But it prevents re-using a stylesheet in an error template if an error occurs during the rendering of a template that re-uses the layout. This is because the ExceptionController will clear the output buffers.

How to reproduce

  1. checkout symfony/demo
  2. add a twig runtime error into the homepage template inside the body, f.ex. {{ 1 / 0 }}
  3. the error template will not embed the "css/app" stylesheet again as it has been already rendered before

Possible Solution
The EntryPointLookup class must only return a template once per request.

@weaverryan
Copy link
Member

weaverryan commented Jan 16, 2019

Hey!

Thanks for confirming this - we have a PR for this #21 - we just need to finish it. I think the approach is that we should always call reset when an exception is thrown (via a listener).

@carsonbot
Copy link
Collaborator

Thank you for this issue.
There has not been a lot of activity here for a while. Has this been resolved?

@carsonbot
Copy link
Collaborator

Just a quick reminder to make a comment on this. If I don't hear anything I'll close this.

@MrMitch
Copy link

MrMitch commented Apr 10, 2025

Seeing that #24 is closed in favor of #71 which has been merged, I think this could be closed as well ?

@eschultz-magix @weaverryan what do you think ?

@carsonbot carsonbot removed the Stalled label Apr 10, 2025
@Kocal Kocal closed this as completed Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants