Bug #91134
closedThe object of type "<Model>" given to update must be persisted already, but is new.
0%
Description
The first time this bug appeared is in TYPO3 10. It was working properly in previous versions (I tested TYPO3 9 and 8 as well).
I have a FrontendUser validation in my Controller. When I edit that user and enter invalid data, an validation error is displayed. So far so good. Then I enter valid data and now I get the exception:
The object of type "TYPO3\CMS\Extbase\Domain\Model\FrontendUser" given to update must be persisted already, but is new.
What happens is that after the model was validated with the invalid state, the form looses the frontend user identifier.
This bug is critical, as once you enter invalid data into a form, there is no more way to save the form.
Attached an extension to try it out.
Create a page, create frontend user group and frontend user, select the new object type, add the typoscript template, set the persistence id in the constants file and add the plugin to the page. Then you can replicate the bug.
In the attached extension the HTML snippet '<input type="hidden" name="tx_frontenduserexample_frontenduserexample[user][__identity]" value="1">'
gets lost in the form.
Updated by Simon Schaufelberger over 4 years ago
- Related to Bug #89434: Action argument values will get lost on validation error added
Updated by Simon Schaufelberger over 4 years ago
- Related to deleted (Bug #89434: Action argument values will get lost on validation error)
Updated by Simon Schaufelberger over 4 years ago
- Is duplicate of Bug #89434: Action argument values will get lost on validation error added
Updated by Simon Schaufelberger over 4 years ago
- File deleted (
frontend_user_example.zip)
Updated by Alexander Schnitzler over 4 years ago
Is this ticket issue still valid? From our ptivate conversation I would say it's solved but please confirm.
Updated by Simon Schaufelberger over 4 years ago
yes can be closed. I just can't change the status myself.
Updated by Riccardo De Contardi over 4 years ago
- Status changed from New to Closed
@Simon Schaufelberger thank you for your quick reply; this ticket is closed in agreement with the reporter.
If you think that this is the wrong decision or experience the issue again please reopen it or open a new ticket with a reference to this one.