From c21b9a2d85bacf3ae474cde6f8f5bba97aca3d49 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Wed, 18 Dec 2024 10:24:12 +0100 Subject: [PATCH 1/6] [TASK] Fix description of additionalCanonicalizedUrlParameters The described logic of this is actually the inverse of it. Closes #5152 Releases: main, 13.4, 12.4 --- .../ApiOverview/Seo/CanonicalApi.rst | 31 +++++++++++-------- .../Configuration/Typo3ConfVars/FE.rst | 3 +- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Documentation/ApiOverview/Seo/CanonicalApi.rst b/Documentation/ApiOverview/Seo/CanonicalApi.rst index ba40f1a84d..1235d40feb 100644 --- a/Documentation/ApiOverview/Seo/CanonicalApi.rst +++ b/Documentation/ApiOverview/Seo/CanonicalApi.rst @@ -16,27 +16,32 @@ cHash. EXT:seo. You can find information about how to install and use it in the :doc:`EXT:seo manual `. -Excluding arguments from the generation -======================================= +.. _canonicalapi-additionalparameters: -TYPO3 will fallback to building a URL of current page and appending query strings. -It is possible to exclude specific arguments from being appended. +Including specific arguments from the generation +================================================ + +TYPO3 will building a URI of the current page and append query strings +which are needed for the cHash calculation (vital arguments to uniquely identify +the given content URI). + +It is possible to additionally include specific arguments. This is achieved by adding those arguments to a PHP variable: -.. code-block:: php - :caption: EXT:site_package/ext_localconf.php +.. code-block:: php + :caption: EXT:site_package/ext_localconf.php - $GLOBALS['TYPO3_CONF_VARS']['FE']['additionalCanonicalizedUrlParameters'][] = 'example_argument_name'; + $GLOBALS['TYPO3_CONF_VARS']['FE']['additionalCanonicalizedUrlParameters'][] = 'example_argument_name'; -It is possible to exclude nested arguments: +It is possible to include nested arguments: -.. code-block:: php - :caption: EXT:site_package/ext_localconf.php +.. code-block:: php + :caption: EXT:site_package/ext_localconf.php - $GLOBALS['TYPO3_CONF_VARS']['FE']['additionalCanonicalizedUrlParameters'][] = 'example_argument_name[second_level]'; + $GLOBALS['TYPO3_CONF_VARS']['FE']['additionalCanonicalizedUrlParameters'][] = 'example_argument_name[second_level]'; -Arguments in general should be excluded from cHash as well as ``additionalCanonicalizedUrlParameters``. -See the possible options in :ref:`caching`, regarding excluding arguments from cHash. +Non-vital arguments in general should be excluded from cHash and not be listed as ``additionalCanonicalizedUrlParameters``. +See the possible options in :ref:`caching` regarding excluding arguments from cHash. The idea behind that is: diff --git a/Documentation/Configuration/Typo3ConfVars/FE.rst b/Documentation/Configuration/Typo3ConfVars/FE.rst index 69c8745871..d31a118e02 100644 --- a/Documentation/Configuration/Typo3ConfVars/FE.rst +++ b/Documentation/Configuration/Typo3ConfVars/FE.rst @@ -462,7 +462,8 @@ the TYPO3 frontend: :type: array :Default: [] - The given parameters will be included when calculating canonicalized URL + The given parameters will be included when calculating canonicalized URL. + See :ref:`canonicalapi-additionalparameters` for details. .. _typo3ConfVars_fe_cacheHash: From 93f13f9fe4cc72bc4ea87fa64de24143a5d6e04b Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Thu, 19 Dec 2024 11:01:43 +0100 Subject: [PATCH 2/6] Update Documentation/ApiOverview/Seo/CanonicalApi.rst Co-authored-by: Oliver Bartsch --- Documentation/ApiOverview/Seo/CanonicalApi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ApiOverview/Seo/CanonicalApi.rst b/Documentation/ApiOverview/Seo/CanonicalApi.rst index 1235d40feb..667fe7998e 100644 --- a/Documentation/ApiOverview/Seo/CanonicalApi.rst +++ b/Documentation/ApiOverview/Seo/CanonicalApi.rst @@ -18,7 +18,7 @@ cHash. .. _canonicalapi-additionalparameters: -Including specific arguments from the generation +Including specific arguments for the URL generation ================================================ TYPO3 will building a URI of the current page and append query strings From 3ee7619ea448b833649084fbab3659715a3991eb Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Thu, 19 Dec 2024 11:01:52 +0100 Subject: [PATCH 3/6] Update Documentation/ApiOverview/Seo/CanonicalApi.rst --- Documentation/ApiOverview/Seo/CanonicalApi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ApiOverview/Seo/CanonicalApi.rst b/Documentation/ApiOverview/Seo/CanonicalApi.rst index 667fe7998e..14b00459ae 100644 --- a/Documentation/ApiOverview/Seo/CanonicalApi.rst +++ b/Documentation/ApiOverview/Seo/CanonicalApi.rst @@ -23,7 +23,7 @@ Including specific arguments for the URL generation TYPO3 will building a URI of the current page and append query strings which are needed for the cHash calculation (vital arguments to uniquely identify -the given content URI). +the given content URI). This is especially important with for example detail pages of records. The query parameters are crucial to show the right content. It is possible to additionally include specific arguments. This is achieved by adding those arguments to a PHP variable: From 0f4bfd25b6c2e6326d5f211b2bfed8d4e7379d3c Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Thu, 19 Dec 2024 11:02:05 +0100 Subject: [PATCH 4/6] Update Documentation/ApiOverview/Seo/CanonicalApi.rst --- Documentation/ApiOverview/Seo/CanonicalApi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ApiOverview/Seo/CanonicalApi.rst b/Documentation/ApiOverview/Seo/CanonicalApi.rst index 14b00459ae..1dfa12a920 100644 --- a/Documentation/ApiOverview/Seo/CanonicalApi.rst +++ b/Documentation/ApiOverview/Seo/CanonicalApi.rst @@ -26,7 +26,7 @@ which are needed for the cHash calculation (vital arguments to uniquely identify the given content URI). This is especially important with for example detail pages of records. The query parameters are crucial to show the right content. It is possible to additionally include specific arguments. -This is achieved by adding those arguments to a PHP variable: +This is achieved by adding those arguments to the configuration: .. code-block:: php :caption: EXT:site_package/ext_localconf.php From 1f293cfff20117b16c308a8a2938b715ef58720d Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:13:26 +0100 Subject: [PATCH 5/6] Update Documentation/ApiOverview/Seo/CanonicalApi.rst --- Documentation/ApiOverview/Seo/CanonicalApi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ApiOverview/Seo/CanonicalApi.rst b/Documentation/ApiOverview/Seo/CanonicalApi.rst index 1dfa12a920..40df0f7322 100644 --- a/Documentation/ApiOverview/Seo/CanonicalApi.rst +++ b/Documentation/ApiOverview/Seo/CanonicalApi.rst @@ -19,7 +19,7 @@ cHash. .. _canonicalapi-additionalparameters: Including specific arguments for the URL generation -================================================ +==================================================== TYPO3 will building a URI of the current page and append query strings which are needed for the cHash calculation (vital arguments to uniquely identify From cea4d1b2c23886f6b150504b73c08b9d848867de Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:13:42 +0100 Subject: [PATCH 6/6] Update Documentation/ApiOverview/Seo/CanonicalApi.rst --- Documentation/ApiOverview/Seo/CanonicalApi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/ApiOverview/Seo/CanonicalApi.rst b/Documentation/ApiOverview/Seo/CanonicalApi.rst index 40df0f7322..22dfabb8f5 100644 --- a/Documentation/ApiOverview/Seo/CanonicalApi.rst +++ b/Documentation/ApiOverview/Seo/CanonicalApi.rst @@ -19,7 +19,7 @@ cHash. .. _canonicalapi-additionalparameters: Including specific arguments for the URL generation -==================================================== +=================================================== TYPO3 will building a URI of the current page and append query strings which are needed for the cHash calculation (vital arguments to uniquely identify