From 3f22bf1f55f4854eb961b340b1f51d5190714b59 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Wed, 28 May 2025 09:32:23 +0200 Subject: [PATCH 1/3] [DOCS] Document request independence for BaseVariants conditions See https://forge.typo3.org/issues/106696 - conditions must be request independant. Thus, "ip()" and "traverse(request)" examples are removed and it is stated that request dependency must be avoided. Otherwise, custom condition/expression providers must be utilized. --- .../ApiOverview/SiteHandling/BaseVariants.rst | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/Documentation/ApiOverview/SiteHandling/BaseVariants.rst b/Documentation/ApiOverview/SiteHandling/BaseVariants.rst index 71ef36dc0c..d16a1545de 100644 --- a/Documentation/ApiOverview/SiteHandling/BaseVariants.rst +++ b/Documentation/ApiOverview/SiteHandling/BaseVariants.rst @@ -100,17 +100,16 @@ Properties Functions ========= -All functions from +Functions from :t3src:`core/Classes/ExpressionLanguage/FunctionsProvider/DefaultFunctionsProvider.php` -are available: +are available, as long as they are request-independant (due to caching reasons). For +request-dependant conditions/functions, have a look at :composer:`b13/host-variants` +to see how to add custom condition/function providers to suit your needs. -.. option:: ip +That means, specifically you can **not** use the `ip()` or `traverse(request...)` +conditions in the handling of base variants. - :type: string - :Example: `ip("203.0.113.*")` - - Match an IP address, value or regex, wildcards possible. - Special value: `devIp` for matching `devIpMask`. +Some examples: .. option:: compatVersion @@ -151,13 +150,3 @@ are available: Check whether a feature (":ref:`feature toggle `") is enabled in TYPO3. - -.. option:: traverse - - :type: array|string - :Example: `traverse(request.getQueryParams(), 'tx_news_pi1/news') > 0` - - This function has two parameters: - - * first parameter is the array to traverse - * second parameter is the path to traverse From 78e0a65741e38da22734d40873f24755399c1406 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Wed, 11 Jun 2025 15:47:00 +0200 Subject: [PATCH 2/3] Update BaseVariants.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com> --- Documentation/ApiOverview/SiteHandling/BaseVariants.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ApiOverview/SiteHandling/BaseVariants.rst b/Documentation/ApiOverview/SiteHandling/BaseVariants.rst index d16a1545de..c8fa7c90c8 100644 --- a/Documentation/ApiOverview/SiteHandling/BaseVariants.rst +++ b/Documentation/ApiOverview/SiteHandling/BaseVariants.rst @@ -102,7 +102,7 @@ Functions Functions from :t3src:`core/Classes/ExpressionLanguage/FunctionsProvider/DefaultFunctionsProvider.php` -are available, as long as they are request-independant (due to caching reasons). For +are available, as long as they are request-independent (due to caching reasons). For request-dependant conditions/functions, have a look at :composer:`b13/host-variants` to see how to add custom condition/function providers to suit your needs. From b8599b4e320ffb8a0b8ef64b7d81e225b3f2b492 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Wed, 11 Jun 2025 15:47:06 +0200 Subject: [PATCH 3/3] Update BaseVariants.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com> --- Documentation/ApiOverview/SiteHandling/BaseVariants.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ApiOverview/SiteHandling/BaseVariants.rst b/Documentation/ApiOverview/SiteHandling/BaseVariants.rst index c8fa7c90c8..586d3c3597 100644 --- a/Documentation/ApiOverview/SiteHandling/BaseVariants.rst +++ b/Documentation/ApiOverview/SiteHandling/BaseVariants.rst @@ -103,7 +103,7 @@ Functions Functions from :t3src:`core/Classes/ExpressionLanguage/FunctionsProvider/DefaultFunctionsProvider.php` are available, as long as they are request-independent (due to caching reasons). For -request-dependant conditions/functions, have a look at :composer:`b13/host-variants` +request-dependent conditions/functions, have a look at :composer:`b13/host-variants` to see how to add custom condition/function providers to suit your needs. That means, specifically you can **not** use the `ip()` or `traverse(request...)`