Bug #89777

Extbase objects retrieved from a fe_user session cannot be persisted in their Repository

Added by Christian Eßl 6 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2019-11-26
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

How to reproduce:

- Save an extbase model object in the fe_user session:

$GLOBALS['TSFE']->fe_user->setKey('ses', 'sessionname', $foo);

- Now retrieve the object from the session:

$foo = $GLOBALS['TSFE']->fe_user->getKey('ses', 'sessionname');

- A complete extbase model object will now be retrieved. However if you use the "update" method of the Repository, the call will fail with the exception:

$fooRepository->update($foo);
The object of type "Foo" given to update must be persisted already, but is new.

If you call _isNew() on the object from the session, it will return false.

History

#1 Updated by Gerrit Code Review 5 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62782

#2 Updated by Christian Eßl 3 months ago

As discussed on gerrit, not really a bug and should not be fixed. -> issue can be closed.

#3 Updated by Bjoern Jacob 3 months ago

  • Status changed from Under Review to Closed

Thx for your feedback. Closing it as requested.

Also available in: Atom PDF