-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
PR #11293 causes documented blade solution for forms to not work. #11369
Comments
This is an issue outside of templating too. I have been getting While it is more of an edge case, this is a breaking change to existing behaviours. |
I had the same issue in Antlers. Downgraded to version 5.44.0 and it works again. My code looks a bit like this:
Exception:
|
Noticed the same trouble today. I use the old Adding toArray() fixes it, i.e.: |
Just tagged v5.45.2 which reverts the PR causing the issue. |
Bug description
After upgrading to version
1.54.0
which included pull request 11293([5.x] Allow form fields view to be rendered with single tag) all of my forms stopped being able to render.In my case I have followed the Blade version of the documentation from "The Template" which states you have to
@foreach
over the fields. However the change in this PR changes the result from an array of the form inputs to theFieldsVariable
object.My fix from the documented
was to call
toArray()
on the$fields
objectI feel like
$fields->toArray()
should just be a workaround as the documented version makes more sense from a Blade point of view.How to reproduce
Create a form in the control panel, follow the documented solution to render the form using blade templates,
$fields
are not rendered because they are no longer an array.Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: