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
[SymfonyForm] Updating to 4.4.9 crash with Unable to get a property on a non-object. #37072
Comments
Can you create a small example application that allows to reproduce the issue? |
Is that https://github.com/ak3l/symfony4/pull/33 enough ? @xabbuh |
I tried #37027 (comment) It certainly related to the same PR, but I preferred to open a separate issue since the error message wasn't the same. I've made some investigation I can't really do more... |
Can you check if #37085 fixes this by chance? |
@xabbuh I tried editing my vendor with your changes, I still get the error |
I tried to checkout your example, but didn't manage to do so. Can you reduce it a bit so that I don't need stuff like Homestead and Vagrant and/or can you post the exact error and the stack trace of the exception? |
I never made a symfony project without a vagrant... What was the issue you encountered ? Maybe if you provide me a Symfony 4 project with a database which is working on your device, I can reproduce the error. @xabbuh The exact error and the stack trace are in the screenshot. |
You can try the Symfony Demo application. It comes with an Sqlite database which can easily be used on any computer. |
@VincentLanglet Please do not spend too much time right now on the example application. I am looking into the |
Status: Reviewed |
If you still need one, I've made https://github.com/VincentLanglet/demo/pull/1 @xabbuh |
Can you try if #37103 fixes this? |
It does on my demo. I will try tomorrow with the project I use for work, but I think you've found the solution :) |
Thank you! :) No we "just" need to write some tests to prevent future regressions. |
@xabbuh I just tried on the project I use for work. It does definitely fix the bug :) |
@VincentLanglet Thank you! :) |
…bbuh) This PR was merged into the 3.4 branch. Discussion ---------- [Form] switch the context when validating nested forms | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #37072 | License | MIT | Doc PR | Commits ------- 38135de switch the context when validating nested forms
Symfony version(s) affected: 4.4.9
Description
I'm using a childAdmin with Sonata
https://symfony.com/doc/master/bundles/SonataAdminBundle/reference/child_admin.html
When I'm on a playList/idPlaylist/video/create url and try to submit the form to create a video and add it to the playlist, I get
Unable to get a property on a non-object.
.Everything worked fined with symfony-form@4.4.8, but when I update to 4.4.9 I get an error.
Additional context
The text was updated successfully, but these errors were encountered: