Review main Abandoned

64068[FEATURE] Allow multiple itemsProcFunc references

Claus Due CR 0 V 0 Normal +120 −33 updated 11/03/21, 15:54

Commit message

This change adds a check if the TCA itemsProcFunc
option is defined as an array, in which case all function
references in the array are executed - as opposed to
the previous behavior which only allowed a single
function reference to exist, meaning that any third
party extension which changed the itemsProcFunc
would also remove the previously registered function.

Result is that third party extensions can add to the
list of items processing functions without removing
the previously configured processing functions.

In addition the following core TCA fields are changed
to define an array where itemsProcFunc is used:

* ``tt_content.colPos``
* ``tt_content.category_field``
* ``tt_content.list_type``
* ``be_groups.availableWidgets``
* ``sys_language.language_isocode``
* ``sys_filemounts.folder``
* ``sys_file_collection.folder``
* ``pages.backend_layout``
* ``pages.backend_layout_next_level``

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 8

Review log 1316

  1. Claus Due uploaded patch set 1 04/04/20, 10:16

  2. TYPO3com voted on patch set 1 V -1 04/04/20, 10:28 Completed build in 11m 58s on Sat, 4 Apr, 10:28 AM Test Summary: 72834 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2156

  3. TYPO3com voted on patch set 1 V +1 04/04/20, 10:44 Completed build in 39m 39s on Sat, 4 Apr, 10:44 AM Test Summary: 73288 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2156

  4. Georg Ringer commented on patch set 1 CR -2 04/04/20, 11:28

    That is not a task but a feature and in fact I would use a tca migration then to migrate all time to arrays, however I don't see the need for having such possibilities in core. It increases complexity and hardens debugging. Blocking until solved in core team if we really need that in 10
  5. Claus Due commented on patch set 1 04/04/20, 11:30

    > Patch Set 1: Code-Review-2 > > That is not a task but a feature and in fact I would use a tca migration then to migrate all time to arrays, however I don't see the need for having such possibilities in core. It increases complexity and hardens debugging. > Blocking until solved in core team if we really need that in 10 Required dependency of contingency plan related to https://review.typo3.org/c/Packages/TYPO3.CMS/+/63354 since the structured content initiative has rejected the feature. As such, is technically subject to exemption from feature freeze.
  6. Benni Mack commented on patch set 1 04/14/20, 14:55

    Hey Claus, Is this needed due to the BackendLayout itemprocfunc specifically?
  7. Claus Due commented on patch set 1 04/14/20, 15:20

    > Patch Set 1: > > Hey Claus, Is this needed due to the BackendLayout itemprocfunc specifically? Yep, tt_content.colPos is the the main reason, but it made sense to allow multiple processing functions in general (I view this as kind of a hook like processing more than a singular implementation).
  8. Benni Mack commented on patch set 1 04/17/20, 12:57

    I agree, this is a feature (= RST), and an automated TcaMigration would be the way to go.
  9. Claus Due commented on patch set 1 04/18/20, 10:47

    > Patch Set 1: > > I agree, this is a feature (= RST), and an automated TcaMigration would be the way to go. How to proceed here? I can add the RST, but I don't see a way that a TcaMigration could handle this: the problem being that third party extensions which use this property would still cause the previous value to be overwritten, which means that the finally built TCA would still only contain a single value, making migration redundant. The way the patch works is by changing the way the core "kickstarts" the setting and then assuming that every third party also defines the processing function as arrays, otherwise they would cause fallback to the previous behavior. It might work if we were able to migrate TCA on a per-extension basis instead of migrating the finally built array, but I don't think we have that ability?
  10. Claus Due uploaded patch set 2 04/19/20, 11:06

  11. Claus Due commented on patch set 2 04/19/20, 11:08

    * Rebased on master * RST moved to 10.4 directory and changed to "Feature" * Patch relabled as FEATURE Please advise if there is anything we can do about the mentioned TcaMigration. It appears to be not possible or redundant to perform such migration if it can only be performed on the final resulting TCA as opposed to after loading each extension's TCA.
  12. TYPO3com voted on patch set 2 V +1 04/19/20, 11:18 Completed build in 12m 10s on Sun, 19 Apr, 11:18 AM Test Summary: 73627 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2839

  13. Georg Ringer voted on patch set 2 CR 0 04/19/20, 11:40

  14. Claus Due commented on patch set 2 04/19/20, 13:26

    > however I don't see the need for having such possibilities in core. Since the structured content initiative has rejected the patch that would introduce content grids and now demand that any such feature is delivered as extension, this patch (and https://review.typo3.org/c/Packages/TYPO3.CMS/+/64071) are necessary. If they do not get merged the fallback plan of the structured content initiative cannot be fulfilled without introducing conflicts and using XCLASS.
  15. Oliver Hader commented on patch set 2 CR -2 11/03/21, 15:53

    Just focussing on some old change-sets... I would not continue on making `itemsProcFunc` more unpredictable than necessary - processing these items needs to be more explicit and probably might be handled like in data-providers. Since this is supposed to be a future, I'm convinced it should not be done like in this flaky drive-by-change.
  16. Oliver Hader abandoned the change 11/03/21, 15:54