Review TYPO3_6-2 Abandoned

44744[WIP][BUGFIX] Cloned domain entity has __identity set in Fluid form

Oliver Hader CR 0 V 0 Easy +2 −9 updated 12/08/16, 19:13

Commit message

If an Extbase domain entity is cloned, it internally will be flagged.
If that entity is passed to some form view helper in a Fluid based
view, the __identity notation is rendered as hidden field. As a
result, the original(!) entity that has been cloned will be used
after the form is submitted back to the server.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 11

  1. Oliver Hader uploaded patch set 1 11/16/15, 23:46

  2. Oliver Hader commented on patch set 1 11/16/15, 23:47

    Will forward port tomorrow, if anybody else is willing to do in between, I'm happy as well ;-)
  3. Mathias Brodala voted on patch set 1 CR +1 11/17/15, 08:26

  4. Oliver Hader uploaded patch set 2 11/17/15, 09:52

  5. Oliver Hader commented on patch set 2 11/17/15, 09:55

    Compared it to upstream Fluid again at https://git.typo3.org/Packages/TYPO3.Fluid.git/blob/HEAD:/Classes/TYPO3/Fluid/ViewHelpers/Form/AbstractFormViewHelper.php#l73 It looks like the "cloned" flag is generally a left over not being used - unless in that very Fluid area.
  6. Oliver Hader commented on patch set 2 CR -1 11/17/15, 10:52

    I think there's more to be considered...
  7. Mathias Schreiber updated the commit message in patch set 3 04/09/16, 20:32

  8. Mathias Schreiber commented on patch set 3 CR -1 04/09/16, 20:32

    re-applying block
  9. Claus Due commented on patch set 3 06/02/16, 16:32

    Has connections to _memorizePropertyCleanState on AbstractDomainObject; according to the comment in that function we have to do this because otherwise, comparison of two objects (for example and 1:1 relation of the form object) will return false because the "dirty" flag gets set when "clone" is called on that property. The method I mention reverses that effect. The source of the whole issue seems to be that a clone is considered dirty - but I don't know the reasoning behind *that* decision. Without it, as far as I can tell, we could drop both this code as suggested in this merge request, the __clone method that sets the dirty flag as well as the code I mention in AbstractDomainObject. It would even make sense to do that as one merge request. But is is safe? I don't know, sorry.
  10. Oliver Hader voted on patch set 3 CR -2 09/22/16, 16:34

  11. Oliver Hader abandoned the change 12/08/16, 19:13

    Won't fix for 6.2 anymore - forge issue is reset to new