Project

General

Profile

Actions

Bug #91134

closed

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

Added by Simon Schaufelberger over 4 years ago. Updated over 4 years 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 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Simon Schaufelberger over 4 years ago

Fixed with TYPO3 10.4.

Actions #2

Updated by Simon Schaufelberger over 4 years ago

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

Updated by Simon Schaufelberger over 4 years ago

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

Updated by Simon Schaufelberger over 4 years ago

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

Updated by Simon Schaufelberger over 4 years ago

  • File deleted (frontend_user_example.zip)
Actions #6

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.

Actions #7

Updated by Simon Schaufelberger over 4 years ago

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

Actions #8

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.

Actions

Also available in: Atom PDF