Replies: 1 comment 2 replies
-
Thanks for pointing that out! That was an unintentional change in behavior in Craft 4. Fixed now for the next release (1fde325). The other dumping tool that might be helpful is the new |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just wanted to know what your expected way to dump in templates is.
Before Craft 4.0.1 I always used the
{% exit %}
token and had this one in my templatesThis doesn't work anymore due to this change
https://github.com/craftcms/cms/blob/4.0.1/src/web/Application.php#L721C8-L735
So my question is: was it intended to remove the ability to debug / output things via
{% exit %}
because there is nothing in the documentation https://craftcms.com/docs/4.x/dev/tags.html#exit it just states that exit will end the request, not that it will prevent any output.I liked to use
exit
because it gave me the possibility to see what was rendered until this point.{% dd %}
kills the previous output and one of the first things I always do in Craft is to remove those lines so I can useexit
again in my dev environment.Maybe you could pass an optional parameter in your
end
function to NOT throw an ExitException or add an additionalendTemplate
function that just calls Yii2end
function?Beta Was this translation helpful? Give feedback.
All reactions