From deab290839c313a9711ae07142eb2d051c1f10bd 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 40e78eb01f..aac15d6cd9 100644 --- a/Documentation/Configuration/Typo3ConfVars/FE.rst +++ b/Documentation/Configuration/Typo3ConfVars/FE.rst @@ -449,7 +449,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 9e02ab322106571bbdcc2b5633a959df9c586561 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 3ac003858bc8a9e1fa08e73e6267d0139ea6561e 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 d8e33f6198ac2be90832459d3f8085468c450c78 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 8e61d945e5d34a40d8bce094d003cc0b6085c459 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 b899d8e84e5f996b324a400bb1e41c08f24be223 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