Project

General

Profile

Actions

Bug #87845

closed

cacheHash.excludedParameters will be ignore when Enhancer is called

Added by Alexey Atsyn over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Start date:
2019-03-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

We detected a problem: when system called PluginEnhancer he wil call exception in the \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::reqCHash function.
I've checked the code and find next:
PageArguments return all query parameters not from config as is and those parameters not compare with cacheHash.excludedParameters

We wrote next patch but don;;t sure is it correct solution:

    public function reqCHash()
    {
        $skip = false;
        if ($this->pageArguments !== null) {
            /** @var \TYPO3\CMS\Frontend\Page\CacheHashCalculator $cacheHashCalculator */
            $cacheHashCalculator = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\CacheHashCalculator::class);
            $relevantParameters = $cacheHashCalculator->getRelevantParameters(
                http_build_query($this->pageArguments->getDynamicArguments(), '', '&', PHP_QUERY_RFC3986)
            );
            $skip = empty($relevantParameters);
        }
        ...

P.S.: we detected this problem with fbclid


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #87981: 404 Page when Google Analytics Parameters (utm_source) in URLClosed2019-03-22

Actions
Related to TYPO3 Core - Bug #88370: Extbase detail view URL call breaks by attaching params from [FE][cacheHash][excludedParameters] if page is uncachedClosed2019-05-16

Actions
Has duplicate TYPO3 Core - Bug #88070: URL with extbase action and additional query string throws error using route enhancerClosed2019-04-04

Actions
Actions #1

Updated by Susanne Moog over 5 years ago

  • Category changed from Frontend to Site Handling, Site Sets & Routing
Actions #2

Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #3

Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #4

Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #5

Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #6

Updated by Gerrit Code Review over 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #7

Updated by Gerrit Code Review over 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #8

Updated by Gerrit Code Review over 5 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #9

Updated by Gerrit Code Review over 5 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #10

Updated by Gerrit Code Review over 5 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #11

Updated by Gerrit Code Review over 5 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #12

Updated by Grigory Rechkin over 5 years ago

  • Related to Bug #87981: 404 Page when Google Analytics Parameters (utm_source) in URL added
Actions #13

Updated by Grigory Rechkin over 5 years ago

  • Related to Bug #88070: URL with extbase action and additional query string throws error using route enhancer added
Actions #14

Updated by Gerrit Code Review over 5 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #15

Updated by Grigory Rechkin over 5 years ago

  • Related to Bug #88370: Extbase detail view URL call breaks by attaching params from [FE][cacheHash][excludedParameters] if page is uncached added
Actions #16

Updated by Josef Glatz over 5 years ago

  • Target version set to Candidate for patchlevel
Actions #17

Updated by Gerrit Code Review over 5 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #18

Updated by Gerrit Code Review over 5 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #19

Updated by Helmut Hummel about 5 years ago

  • Related to deleted (Bug #88070: URL with extbase action and additional query string throws error using route enhancer)
Actions #20

Updated by Helmut Hummel about 5 years ago

  • Has duplicate Bug #88070: URL with extbase action and additional query string throws error using route enhancer added
Actions #21

Updated by Gerrit Code Review about 5 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #22

Updated by Gerrit Code Review about 5 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #23

Updated by Gerrit Code Review about 5 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #24

Updated by Gerrit Code Review about 5 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #25

Updated by Gerrit Code Review about 5 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #26

Updated by Gerrit Code Review about 5 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #27

Updated by Robert von Hackwitz about 5 years ago

Hi, same problem with default [FE][cacheHash][excludedParameters] = utm_source,utm_medium,pk_kwd,utm_source,utm_medium,utm_campaign,utm_term,utm_content,gclid,fbclid
and tx_news

Urls like https://sitename/read-news/news-path-segment?utm_source=xxx&utm_medium=twitter (as example) generates
error {"exception":"TYPO3\\CMS\\Core\\Error\\Http\\PageNotFoundException: Request parameters could not be validated (&cHash empty)

Patch doesn't works

Actions #28

Updated by Alexander Opitz about 5 years ago

Hi Robert,

do you overwrite this setting in your LocalConfiguration/AdditionalConfiguration? If yes, do you use a string or an array for that? I ask, cause your line (copied from install tool?) looks a bit confuse, it misses the L and pk_compaign parameter and utm_source/medium is doubled.

Actions #29

Updated by Robert von Hackwitz about 5 years ago

Hi Alexander, thank you for your kind response.
You're right: [FE][cacheHash][excludedParameters] is wrong.
I have restored default settings [FE][cacheHash][excludedParameters] = L,pk_campaign,pk_kwd,utm_source,utm_medium,utm_campaign,utm_term,utm_content,gclid,fbclid

but the problem persist

Actions #30

Updated by Alexander Opitz about 5 years ago

Hi Robert,

can you show the configuration how it is written in your LocalConfiguration.php?

Actions #31

Updated by Robert von Hackwitz about 5 years ago

Hi Alexander,
here's the configuration
'FE' => [
'cacheHash' => [
'excludedParameters' => [
'L',
'pk_campaign',
'pk_kwd',
'utm_source',
'utm_medium',
'utm_campaign',
'utm_term',
'utm_content',
'gclid',
'fbclid'
],
],
'debug' => true,
'disableNoCacheParameter' => true,
'loginSecurityLevel' => 'normal',
'pageNotFoundOnCHashError' => true,
'passwordHashing' => [
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
'options' => [],
],
],

Actions #32

Updated by Alexander Opitz about 5 years ago

Ok, looks fine :-)
So, you are using the given patch on a TYPO3 from git master?

Actions #33

Updated by Gerrit Code Review about 5 years ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #34

Updated by Gerrit Code Review about 5 years ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60296

Actions #35

Updated by Gerrit Code Review about 5 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62221

Actions #36

Updated by Gerrit Code Review about 5 years ago

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62221

Actions #37

Updated by Grigory Rechkin about 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #38

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF