Skip to content
Snippets Groups Projects
  1. Oct 10, 2024
  2. Jul 11, 2024
  3. Jul 09, 2024
  4. Jun 28, 2024
  5. Apr 03, 2024
  6. Jan 26, 2024
    • Christian Kuhn's avatar
      [!!!][FEATURE] Avoid TSFE->config['config'] · a085e885
      Christian Kuhn authored
      Frontend TypoScript has two special details, next to
      'configuration' ("constants") and 'setup'.
      
      First, there is the determined "PAGE" object that depends
      on type / typeNum. It allows to render multiple different
      variants of a pages content. Historically, this has often
      been a "print" view, nowadays, this is usually a "json"
      variant, or some XML for sitemaps.
      
      A frontend is not rendered without a proper PAGE object.
      The FE rendering chain determines the given 'type' and maps
      it to a configured PAGE with this 'typeNum', defaulting
      to zero '0'.
      The patch models the determined PAGE object to the Request
      attribute 'FrontendTypoScript' now, which is used by FE
      RequestHandler to manage rendering of this PAGE type.
      
      Second special thing is 'config' TypoScript as top-level
      'config' settings. Those can be overridden by the specific
      PAGE object (often 'page.config'). A typical use case is
      'json.config.disableAllHeaderCode = 1'.
      This "merged" 'config' array has been available as
      TSFE->config['config'] before. The patch makes the merged
      config available in the 'FrontendTypoScript' object as
      well, available in the Request object as
      'frontend.typoscript' attribute.
      
      The patch adapts all usages of TSFE->config['config'] to
      the attribute.
      
      There is a special quirk with 'config': This part of
      TypoScript 'setup' is so important, that it needs to be
      available in 'fully cached page' scenarios as well, to
      for instance decide if a content-length header should be
      added to the response.
      This has been the reason 'config' has been cached along
      with page cache content in 'page' cache before.
      The patch changes this and adds dedicated cache entries
      for 'merged config' in the (file based) 'typoscript' cache.
      This reduces page cache size a bit and allows re-using
      these 'config' cache accross different pages when they
      are identical, which is determined by the cache identifiers.
      
      All these changes are logical follow-ups to the TypoScript
      parser that has been implemented with v12.
      They pave the way to extract TypoScript calculation from
      TypoScriptFrontendController with upcoming patches.
      
      Next to this refactoring, the existing hooks in this area
      had to fall, especially to get rid of their dependency to
      "pObj" TypoScriptFrontendController. They are mostly
      substituted by new events, details are documented with the
      .rst files and class comments.
      
      The patch reduces usages of $GLOBALS['TSFE'] and usages
      of TypoScriptFrontendController in general.
      
      $GLOBALS['TSFE']->config['config'] is still available as
      b/w compat layer (a dedicated deprecation will follow),
      but core usages have been removed. This became a bit
      complicated with TimeTrackerInitialization and
      WorkspacePreview middlewares: Both are run before the
      final TypoScript 'config' is determined, so they do
      not have that attribute attached to their incoming
      Request. But they still need to know TS 'config'
      details to decide on details *after* calling lower handle()
      middlewares. They by now accessed $GLOBALS['TSFE'], which
      is (still) set by a lower middleware. To avoid this
      indirect state usage, these middlewares now register an event
      listener that is dispatched after TypoScript 'config' has been
      determined, and set local state to know if they should add
      additional Response data.
      
      Resolves: #102932
      Releases: main
      Change-Id: I8282f7a93fe9594e78865db63a3e656cc4d5f8da
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82522
      
      
      Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
      Tested-by: default avatarBenni Mack <benni@typo3.org>
      Reviewed-by: default avatarBenni Mack <benni@typo3.org>
      Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
      Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
      Tested-by: default avatarcore-ci <typo3@b13.com>
      Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
      a085e885
  7. Jan 24, 2024
  8. Jan 19, 2024
  9. Jan 12, 2024
  10. Jan 08, 2024
  11. Jan 06, 2024
    • Benni Mack's avatar
      [!!!][TASK] Unify _PAGES_OVERLAY_UID and _LOCALIZED_UID · 70b2588e
      Benni Mack authored
      When doing language overlays in PageRepository
      an overlaid language for a page received special properties:
      
      * "_PAGES_OVERLAY_UID" (the UID of the translated page)
      * "_PAGES_OVERLAY" (a flag indicating that a translation happened)
      * "_PAGES_OVERLAY_LANGUAGE" (the sys_language_uid record)
      * "_PAGES_OVERLAY_REQUESTEDLANGUAGE" (info which language was requested)
      
      For regular records (non-pages) only one special property
      was used "_LOCALIZED_UID".
      
      This patch unifies the properties, as this was a historical
      technical debt due to "pages" vs. "pages_language_overlays"
      and other records.
      
      "_PAGES_OVERLAY_UID" is replaced with "_LOCALIZED_UID",
      "_PAGES_OVERLAY" is removed as a isset check for "_LOCALIZED_UID"
      can be used
      "_PAGES_OVERLAY_LANGUAGE" is replaced in favor of the native "sys_language_uid"
      field
      "_PAGES_OVERLAY_REQUESTEDLANGUAGE" is replaced with "_REQUESTED_OVERLAY_LANGUAGE"
      and now also available for non-page records
      
      As seen in the changes, some code can now be simplified
      due to superfluous checks on "_PAGES_OVERLAY_UID" and directly
      using "_LOCALIZED_UID".
      
      Releases: main
      Resolves: #102627
      Change-Id: I7b5c9de66cccc4d2f0907d4d9c51a5b66aa4d4e8
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82300
      
      
      Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
      Reviewed-by: default avatarBenni Mack <benni@typo3.org>
      Tested-by: default avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
      Tested-by: default avatarcore-ci <typo3@b13.com>
      Tested-by: default avatarBenni Mack <benni@typo3.org>
      Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
      70b2588e
  12. Dec 09, 2023
  13. Dec 01, 2023
  14. Oct 24, 2023
  15. Oct 15, 2023
  16. Sep 25, 2023
  17. Jul 04, 2023
  18. Jun 12, 2023
  19. Apr 17, 2023
  20. Apr 11, 2023
  21. Mar 20, 2023
  22. Mar 14, 2023
  23. Feb 13, 2023
  24. Jan 23, 2023
  25. Jan 20, 2023
  26. Jan 18, 2023
  27. Nov 20, 2022
  28. Nov 17, 2022
  29. Nov 04, 2022
  30. Oct 29, 2022
  31. Oct 25, 2022
  32. Oct 18, 2022
  33. Oct 10, 2022
  34. Sep 21, 2022
  35. Sep 06, 2022
  36. Jul 18, 2022
  37. Jul 12, 2022