Review main Abandoned

62782[BUGFIX] Allow updating extbase objects that come from session variables.

Christian Eßl CR 0 V 0 Easy +10 −1 updated 02/09/20, 10:32

Commit message

When an extbase object is saved to an fe_user session and later
retrieved, the object will not be available in the persistence manager's
object map. (As it was retrieved with a unserialize() function)
In this case, an exception would be shown, that the object given to
update() is new and cannot be persisted. (Although it is not new)
To prevent this from happening, an additional check in the
persistence manager's isNewObject() is added. If the object was not
found in the object map, but is not marked as new, it will automatically
be registered to the persistence manager's session.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 78

  1. Christian Eßl uploaded patch set 1 12/29/19, 14:11

  2. Michael Oehlhof voted on patch set 1 CR +1 12/29/19, 14:15

  3. TYPO3com voted on patch set 1 V +1 12/29/19, 14:18 Completed build in 07m 46s on Sun, 29 Dec, 02:18 PM Test Summary: 69128 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39649

  4. Oliver Klee commented on patch set 1 12/29/19, 16:57

    Can we have tests for this?
  5. Mathias Brodala commented on patch set 1 01/02/20, 08:58

    Personally I think you should not persist a whole object in the user session but only its identifier. Then you can retrieve it when loading the session. Have you tried this?
  6. Ghanshyam Bhava voted on patch set 1 CR +1 02/04/20, 13:14

  7. Alexander Schnitzler commented on patch set 1 02/04/20, 16:08

    > Patch Set 1: > > Personally I think you should not persist a whole object in the user session but only its identifier. Then you can retrieve it when loading the session. Have you tried this? I am with Mathias here. Objects shouldn't be serialized into fe_user sessions. If you find enough votes and not counter votes, I will not interfere. But I am not the one to merge this patch.
  8. Christian Eßl abandoned the change 02/09/20, 10:32

    Hi, the explanation for not serializing extbase objects sounds reasonable. - I will abandon this patch.