Skip to content
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

Multi-Step forms fail when saving objects in the Form State #143

Closed
ger4003 opened this issue Jul 27, 2021 · 2 comments
Closed

Multi-Step forms fail when saving objects in the Form State #143

ger4003 opened this issue Jul 27, 2021 · 2 comments
Assignees
Labels

Comments

@ger4003
Copy link
Contributor

ger4003 commented Jul 27, 2021

In my usecase the FormState holds asset objects like Neos\Media\Domain\Model\Document or Neos\Media\Domain\Model\Image. When form is rendered with initalized formState having one of the mentioned objects, an exception is thrown:

Absorbed Exception: Notice: property_exists(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Neos\Media\Domain\Model\Document" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in .../Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Flow_Persistence_Doctrine_PersistenceManager.php line 188

Is related to #126

@bwaidelich bwaidelich self-assigned this Aug 5, 2021
@bwaidelich bwaidelich added the bug label Aug 5, 2021
@bwaidelich bwaidelich changed the title Make allowed_classes configurable when unserializing formState Multi-Step forms fail when saving objects in the Form State Aug 5, 2021
@bwaidelich
Copy link
Member

Thanks again for your report and the PR.
After diving into this I realized that this is actually a very old regression introduced with #101

So I turned this into a bug ticket and will push a PR with a fix ASAP, that will make the configuration feature obsolete.

Related: #126 #135

bwaidelich added a commit that referenced this issue Aug 5, 2021
This fixes a regression introduced with #101 that prevented
objects like images and documents to be persisted in the
Form State, leading to exceptions in multi step forms.

Fixes: #143
Related: #126 #135
@ger4003
Copy link
Contributor Author

ger4003 commented Aug 5, 2021

Solved by #145

@ger4003 ger4003 closed this as completed Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants