Bug #91134

The object of type "<Model>" given to update must be persisted already, but is new.

Added by Simon Schaufelberger about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2020-04-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues

Is duplicate of TYPO3 Core - Bug #89434: Action argument values will get lost on validation errorClosedAlexander Schnitzler2019-10-16

Actions
#1

Updated by Simon Schaufelberger about 1 year ago

Fixed with TYPO3 10.4.

#2

Updated by Simon Schaufelberger about 1 year ago

  • Related to Bug #89434: Action argument values will get lost on validation error added
#3

Updated by Simon Schaufelberger about 1 year ago

  • Related to deleted (Bug #89434: Action argument values will get lost on validation error)
#4

Updated by Simon Schaufelberger about 1 year ago

  • Is duplicate of Bug #89434: Action argument values will get lost on validation error added
#5

Updated by Simon Schaufelberger about 1 year ago

  • File deleted (frontend_user_example.zip)
#6

Updated by Alexander Schnitzler about 1 year ago

Is this ticket issue still valid? From our ptivate conversation I would say it's solved but please confirm.

#7

Updated by Simon Schaufelberger about 1 year ago

yes can be closed. I just can't change the status myself.

#8

Updated by Riccardo De Contardi about 1 year 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.

Also available in: Atom PDF