Review main Merged

83722[TASK] Refine site set default TypoScript handling

Benjamin Franzke CR +2 V +2 Normal +67 −23 updated 04/11/24, 11:55

Commit message

Treat site sets (#103439) as a default content rendering template,
in order to load Extbase plugin registrations prior to site sets.

Also add a possibility to opt out from being loaded globally in
site sets in ExtensionManagementUtility::addTypoScriptSetup
and ExtensionManagementUtility::addTypoScriptConstants in order
to reduce global TypoScript in upcoming commits (#103556).

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Oli Bartsch +1
    • Benjamin Kott +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Oli Bartsch +1
    • Oliver Hader +1
    • Benjamin Kott +1
    • core-ci +1 CI

Issues 3

Files 3

Review log 2835

Show 810 earlier messages
  1. Benjamin Franzke uploaded patch set 1 04/09/24, 17:40

  2. core-ci voted on patch set 1 V +1 04/09/24, 17:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55628

  3. Christian Kuhn commented on patch set 1 04/09/24, 18:43

    ExtensionManagementUtility.php:1030

    let's please talk on this before merge: i'd like to know about and see documented a strategy to phase out this insane magic with future versions to let this harmful misconcept that no normal person understands, die.
  4. Christian Kuhn commented on patch set 1 CR -1 04/09/24, 19:00

    i'm actually -1 on implementing this 'magic from globals' with its dependency nightmare magic into the shiny new set approach like this: it increases complexity of something that shouldn't exist in the first place. i'd strongly be in favor of thinking about this again to see if we can't come up with something that gives us a solid option to phase it out instead and substitute it with something more solid and easier to understand.
  5. Benjamin Kott commented on patch set 1 04/10/24, 08:39

    The patch also needs to handle addTypoScriptConstants.
  6. Benjamin Kott commented on patch set 1 04/10/24, 08:50

    Reply

    The current plan was the following: 1. Keep existing record-based template handling as is 2. Ignore defaultContentRendering in site context 3. Always load the global typoscript first in the site context I agree that we need to get rid of the magic sorting of includes and adding globals after the default content rendering. This was necessary back in the dark days because the defaultContentRendering was used to reset everything. This was already changed versions ago so there is no need anymore to keep it, except people rely on the magic order. When the user decides to clear it themselves, they need to handle the plugin rendering. We also moved everything to references instead of copy. With the introduction of sets we can change the loading order here to a new default, since we do not need to take care of bc loading compat. The user has full control over everything included and the dependencies will sort them and fill in everything needed. We still need the global typoscript loaded here, otherwise the plugin registration will break. But it is fine when it´s loaded first.
  7. Benjamin Kott commented on patch set 1 04/10/24, 08:51

    Reply

    Ignore defaultContentRendering in site context -> it should state "SITE SET CONTEXT"
  8. Benjamin Franzke updated the commit message in patch set 2 CR -1 V +1 04/10/24, 15:00

  9. Benjamin Franzke commented on patch set 2 04/10/24, 15:00

    Reply

    Hey lolli, i don't know what dependency nightmare you refer to, the plan of this commit is actually to reduce global javascript. We basically want to convert global stuff like `addTypoScriptConstants` to selectable sets, while staying fully compatible for current `sys_template` setups. Therefore the new option `includeInSiteSets` that will be used in upcmoming commits (I updated the commit message accordingly) to actually ensure we have less "magic". The magic needs to stay for compat for now. The plan is to entirely replace it (with a new content registration API – that should be content blocks, but I don't yet know how well it will fit, but that's the "plan"). OK?
  10. core-ci voted on patch set 2 V +1 04/10/24, 15:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55690

  1. Benni Mack updated the commit message in patch set 3 V +1 04/10/24, 15:11

  2. core-ci voted on patch set 3 V +1 04/10/24, 15:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55691

  3. Benjamin Franzke commented on patch set 3 04/10/24, 15:40

    Reply

    was an oversiht by benji, personally discussed and resolved.
  4. Oliver Hader commented on patch set 3 04/10/24, 16:50

    What about `\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin()`? (as used in `indexed_search/ext_localconfig.php`)
  5. Benjamin Franzke commented on patch set 3 04/10/24, 17:05

    Reply

    Will be registerd to defaultContentRendering chain, which is now loaded by default in site sets – the site sets are the default content rendering. Also note that we intend to change the implementation of `configurePlugin()` to write into a ContentElementRegistry that will register the needed TypoScript when the content element is actually enabled in a site set. That's stuff for another patch.
  6. Benjamin Franzke uploaded patch set 4 V +1 04/10/24, 17:29

  7. Benjamin Franzke updated the commit message in patch set 5 04/10/24, 17:30

  8. core-ci voted on patch set 5 V +1 04/10/24, 17:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55701

  9. core-ci voted on patch set 4 V +1 04/10/24, 17:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55699

  10. Benjamin Franzke voted on patch set 5 CR -1 04/10/24, 17:56

  11. Benjamin Franzke uploaded patch set 6 CR -1 V +1 04/10/24, 18:13

  12. Benjamin Franzke commented on patch set 6 04/10/24, 18:14

    ExtensionManagementUtility.php:1030 Reply

    Tried to reorganize the code a bit. Can be tested with 83696: [WIP][TASK] Use site sets in EXT:styleguide | https://review.typo3.org/c/Packages/TYPO3.CMS/+/83696
  13. core-ci voted on patch set 6 V +1 04/10/24, 18:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55705

  14. Oli Bartsch voted on patch set 6 CR +1 V +1 04/11/24, 08:45

  15. Andreas Kienast commented on patch set 6 CR -1 04/11/24, 09:22

    SysTemplateTreeBuilder.php:539

    The variable `$defaultTypoScriptConstants` is unused.
  16. Benjamin Franzke uploaded patch set 7 CR +1 V +1 04/11/24, 11:23

  17. Benjamin Franzke commented on patch set 7 04/11/24, 11:23

    SysTemplateTreeBuilder.php:539 Reply

    Done
  18. core-ci voted on patch set 7 V +1 04/11/24, 11:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55762

  19. Oli Bartsch voted on patch set 7 CR +1 V +1 04/11/24, 11:38

  20. Oliver Hader commented on patch set 7 V +1 04/11/24, 11:47

    Tested (especially) for `ext:indexed_search`. Should the "static magic include" property and method param be described at bit in more detail?
  21. Benjamin Kott voted on patch set 7 CR +1 V +1 04/11/24, 11:49

  22. Benjamin Franzke commented on patch set 7 CR +2 V +2 04/11/24, 11:52

    Reply

    The name is derived from the name that lolli assigned. I tried to describe it by splitting it in multiple functions. I think other than that we should find another term instead of magic (which was basically used, because it was unclear or unexpected). So I think this should be fine. Thank you.
  23. Benjamin Franzke merged patch set 8 04/11/24, 11:53

  24. Benjamin Franzke commented on patch set 8 04/11/24, 11:53

    Reply

    Loll, I'm merging this now. Hope this is fine, as discussed in private, we will phone next week in case there is something left.
  25. Georg Ringer commented on patch set 8 04/11/24, 11:55

    don't know if this is described later but new arguments in such often used methods looks like being a feature and should be described later than