-
-
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
Relative admin form is broken after 3.84.0 #6777
Comments
The error you get means that this line is returning Can you debug a little more @vladyslavstartsev ; what's the difference between before and after the commit. SonataAdminBundle/src/Admin/AdminHelper.php Line 205 in 12586a7
else part.Indeed, now the grandChildFormBuilder is found, but then their is no fieldDescription on the direct admin. The comment SonataAdminBundle/src/Admin/AdminHelper.php Line 203 in 12586a7
It seems weird to revert because if you look at So maybe we could fix |
Yes, in 3.83, the
If we do the this one, it would not be recursive.
to modify code here, we need to get
So, what is the best way to do it? |
I don't understand.
it could work.
Dunno... @franmomu You made the change on |
yes, if (!$chilforbuilder || !$admin->hasFormFieldDescription($childFormBuilder->getName())) works perfectly. |
This is the shorter fix we can do ; do you mind creating a PR with an unit test ? |
yes, I'm working on it right now |
The change I made was to fix the To be honest I'm not familiar with the |
PHP version
Subject
I'm sure that it was in
3.84.0
and specifically cf1ec4dMinimal repository with the bug
I'll provide one if the code that I'll give, will not be understandable
Steps to reproduce
UserAdmin
UserInfoAdmin
(the relations between tables isone-to-one
)2.1. in
configureFormFields
ofUserAdmin
write$form->add('userInfo',AdminType::class,)
2.2 The the
user_info
table has relation toone-to-many
table calleduser_info_color
(one info has many colors)UserInfoAdmin
inconfigureFormFields
setUserAdmin
in web and try to set colors withwhere the error happens
Expected results
I get new line in my admin panel
Actual results
where the error happens
the why it happens is because of this commit cf1ec4d in file
src/Admin/AdminHelper.php
methodgetChildFormBuilder
. If I revert changes of this method, it works perfectly.Should I make revert commit?
The text was updated successfully, but these errors were encountered: