Review main Merged

27378[BUGFIX] Unified maxitems default value for group fields

Alexander Stehlik CR +2 V +2 Easy +1 −4 updated 07/25/14, 16:03

Commit message

The maxitems value for a group field defaults to 1 instead of 100000 so
that it is consistent with the TCA reference and the validation in the
DataHandler.

Review

  • Code review CR +2
    • Wouter Wolters +2
    • Xavier Perseguers +1
  • Verified V +2
    • Wouter Wolters +2
    • Xavier Perseguers +1

Issues 1

Files 1

Review log 24

  1. Mr. Jenkins commented on patch set 1 02/06/14, 13:54

  2. Michiel Roos voted on patch set 1 CR +1 02/06/14, 13:57

  3. Wouter Wolters voted on patch set 1 CR +1 02/24/14, 21:48

  4. Wouter Wolters commented on patch set 1 03/07/14, 18:38

    needs rebase
  5. Alexander Stehlik uploaded patch set 2 03/25/14, 16:07

  6. Xavier Perseguers commented on patch set 2 03/25/14, 16:14

    FormEngine.php:2427

    Why not change 0 to 1???
  7. Xavier Perseguers commented on patch set 2 03/25/14, 16:16

    we would need to set default value as well but seems better to use our API and add unnecessary tests
  8. Alexander Stehlik uploaded patch set 3 03/25/14, 16:18

  9. Mr. Jenkins commented on patch set 2 03/25/14, 16:21

  10. Mr. Jenkins commented on patch set 3 03/25/14, 16:32

  11. Xavier Perseguers voted on patch set 3 V +1 CR +1 03/25/14, 16:34

  12. Wouter Wolters voted on patch set 3 V +2 CR +2 06/05/14, 21:07

  13. Wouter Wolters merged patch set 4 06/05/14, 21:07

  14. Helmut Hummel commented on patch set 4 07/10/14, 22:19

    can you point me to the place this validation happens in datahandler? in fact reverting this patch makes it possible to save sys_category records with *multiple* entries in the items field, so at least from testing I cannot reproduce the problem claimed to be fixed here

    FormEngine.php:2418

    This is a breaking change for extensions that previously did not define maxitems now having a different default. also this seems to also be a regression for the core and the sys_category items field
  15. Alexander Stehlik commented on patch set 4 07/11/14, 07:39

    Hi Helmut, thanks for the feedback. Please see my inline comments.

    Reply

    The check is done by the checkValue_checkMax() method in the DataHandler, see: https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/DataHandling/DataHandler.php#L2345

    FormEngine.php:2418 Reply

    It is not a breaking change because the default value in the DataHandler is currently one anyway. I'll upload a test Extension to the issue.
  16. Alexander Stehlik commented on patch set 4 07/11/14, 07:40

    I just realized that this was already merged. Do you think there is a regression?
  17. Alexander Stehlik commented on patch set 4 07/11/14, 08:20

    Please find test instructions and Extension in forge: #55731
  18. Helmut Hummel commented on patch set 4 07/11/14, 08:28

    Seems like a regression. You can reproduce by trying to save a sys_category record with more than one item in "item" field...
  19. Helmut Hummel commented on patch set 4 07/11/14, 08:29

    Reply

    ah, ok. seems this limitation is only applied configurations where the relation are stored as comma separated list in the field, but does not apply to mm relations or foreign field relations
  20. Alexander Stehlik commented on patch set 4 07/11/14, 08:34

    So we need to add maxitems to the sys_category items field configuration?
  21. Helmut Hummel commented on patch set 4 07/11/14, 09:02

    Yes, and/or decide if we accept this breaking change as extensions are also affected by it.
  22. Alexander Stehlik commented on patch set 4 07/11/14, 09:10

    Hmm, yeah, I just realized that this was introduced in a minor update of 6.2 and was not in there from the beginning. Since the documentation is very clear about the default value for the maxitems field (= 1) and the validation in the FormHandler for comma separated lists also behaves like that we could leave it in as a bugfix. The alternative would be to move it to 6.3. Who can make a decision here?
  23. Alexander Opitz commented on patch set 4 07/11/14, 11:06

    The issue from the regression http://forge.typo3.org/issues/60263
  24. Wouter Wolters commented on patch set 4 07/25/14, 16:03

    Reverted This patchset was reverted in change: Ice5357aecb1969f11c6821cb81824d2d68200717