You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to 6.2.3 and PHP 8.2, we suddenly experienced validationerrors when saving pages. The errors reported that the page.parent attribute was null, thus invalidating a NotNull constraint.
After a lot of grepping back and forth a longish debugger session we found out that the PropertyInfoLoader had started to report that the parent attribute on a subclass of AbstractPage - from the HasNodeInterface is a non null value and thus needs to be set when submitting the form.
In our code this seems to kick in after upgrading to 6.1, but I am not sure if this relates to a specific version of doctrine or Symfony dependencies.
Anyhow, the workaround I found was for all subclasses of AbstractPage to add a parent attribute that also disabled the automapping from the validator:
Now, the best solution IMHO would be to either make setParent() accept a null on the HasNodeInterface or to disable the automapping directly on the interface. But as that is quite far into the core of Kunstmaan I thought I'd report an issue before thinking of a PR.
The text was updated successfully, but these errors were encountered:
Hi @tarjei, I lost track of this issue but it's not something we see in our projects so we might need to debug this further. Can you share the installed packages and versions in those projects? And can you check in the symfony config of those projects if framework.validation.auto_mapping is enabled?
After upgrading to 6.2.3 and PHP 8.2, we suddenly experienced validationerrors when saving pages. The errors reported that the page.parent attribute was null, thus invalidating a NotNull constraint.
After a lot of grepping back and forth a longish debugger session we found out that the
PropertyInfoLoader
had started to report that theparent
attribute on a subclass of AbstractPage - from theHasNodeInterface
is a non null value and thus needs to be set when submitting the form.In our code this seems to kick in after upgrading to 6.1, but I am not sure if this relates to a specific version of doctrine or Symfony dependencies.
Anyhow, the workaround I found was for all subclasses of AbstractPage to add a parent attribute that also disabled the automapping from the validator:
Now, the best solution IMHO would be to either make setParent() accept a null on the HasNodeInterface or to disable the automapping directly on the interface. But as that is quite far into the core of Kunstmaan I thought I'd report an issue before thinking of a PR.
The text was updated successfully, but these errors were encountered: