Bug #87728

LinkBuilder on pages with site configuration should not ignore setNoCache

Added by Rozbeh Chiryai Sharahi 3 months ago. Updated 13 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2019-02-17
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

Hello,

i just realized that

\TYPO3\CMS\Frontend\Typolink\PageLinkBuilder::build

will ignore
$conf['no_cache']=1

if we are in the context of a page with site configuration.

Suggestion:

1) Create Functional Test for \TYPO3\CMS\Frontend\Typolink\PageLinkBuilder or for \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder that will check for `no_cache` parameter to be set.

2) Add something like:

if($conf['no_cache']) {
  $queryParameters['no_cache'] = 1
}

to
\TYPO3\CMS\Frontend\Typolink\PageLinkBuilder::generateUrlForPageWithSiteConfiguration

Reproduce:

On any page with site configuration in any controller action do following:

$this->uriBuilder->reset()->setTargetPageUid(123)->setNoCache(true)->build();

Kind regards
Rozbeh Chiryai Sharahi

Associated revisions

Revision 409a6e40 (diff)
Added by Georg Ringer 3 months ago

[BUGFIX] Respect no_cache in PageLinkBuilder

If a link is being built with a site configuration, the
configuration no_cache must be respected.

Resolves: #87728
Releases: master, 9.5
Change-Id: I8d71f11ca953c5744063deec318d9a23c11c1337
Reviewed-on: https://review.typo3.org/c/59715
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Anja Leichsenring <>

Revision 45b72b22 (diff)
Added by Georg Ringer 3 months ago

[BUGFIX] Respect no_cache in PageLinkBuilder

If a link is being built with a site configuration, the
configuration no_cache must be respected.

Resolves: #87728
Releases: master, 9.5
Change-Id: I8d71f11ca953c5744063deec318d9a23c11c1337
Reviewed-on: https://review.typo3.org/c/59791
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review 3 months 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/+/59715

#2 Updated by Gerrit Code Review 3 months 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/+/59791

#3 Updated by Georg Ringer 3 months ago

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

#4 Updated by Benni Mack 13 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF