-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Stop building show/list/form when accessing fieldDescription #6148
Conversation
59ab017
to
d0c6cdd
Compare
6cda303
to
62e884a
Compare
@sonata-project/contributors I need your help on this ! |
If the issue is not easily fixable, isnt it better to just revert your pr and then try to find a better way? to avoid breaking peoples apps. |
62e884a
to
96890a9
Compare
Yes, if I don't find better solution I will remove the But the issue will still be present for others methods, it just not currently happen. Currently SonataPageBundle call But I think I have find the right way to fix this definitely by adding a state. |
Looks ok to me, @gremo does it fix your issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No tests required?
You want a functionnal test to prevent the infinite loop @core23 ? |
a433ad2
a433ad2
to
550132f
Compare
Done @core23. It was pretty useful since I caught a mistake. I wrote
instead of
so the PR wasn't fixing the bug... But everything is ok now. |
550132f
to
b19bd57
Compare
b19bd57
to
0a37ff3
Compare
Done @phansys |
Thanks @VincentLanglet |
Subject
I am targeting this branch, because I think I have found a BC-way to fix the bug (#6142) which can easily occur and create infinite loop.
Currently methods
getFormFieldDescriptions
,getFormFieldDescription
andhasFormFieldDescription
are callingthis->buildForm
.But the
buildForm
method is calling lot of things, as shown in the issue, we may findin the FormMapper->add, or
in the SonataPageBundle configureFormField method witch lead to a
hasFormFieldDescriptions
call.The developper could also possibly use the
getFormFieldDescriptions
,getFormFieldDescription
andhasFormFieldDescription
in the configureFormField and create an infinite loop.Before we didn't try to build the form if the form was already build.
By adding a state, I now do not try to build the form if the build of the form already started.
Closes #6142.
Changelog