-
Notifications
You must be signed in to change notification settings - Fork 642
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
[4.x]: ErrorHandler doesn't render error and content-type while in devMode #11108
Comments
Thanks for reporting that! Fixed for the next release. |
Craft 4.0.1 is out now with the fix for this. |
@brandonkelly I am currently experiencing this issue in 4.0.3 again as well. My error is actually not an |
@jerome2710 Alright, that’s fixed for the next release. To get the fix early, change your |
Craft 4.0.4 is out now with that fix. |
What happened?
Description
Twig Syntax errors result in errors not as HTML
Steps to reproduce
{{ dump('test') }
(note missing closing bracket)Expected behavior
Actual behaviour
Proposed fix
Since the error that is catched in
TemplateResponseFormatter
is only limited toRuntimeError
, try use the parent classError
.However I don't quite understand why the Format
template
is used. Because the format is "template", it results in the default behaviour of not having a content-type, and the parent class (line 192) not rendering the error. This is due to the fact that the format is not HTML or JSON.Craft CMS version
4.0.0.1
PHP version
8.0
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered: