Bug #70147
closedtypolink section - addQueryString = FALSE only returns sectionMark even if there is a query string on current page
100%
Description
Currently if one is on the current page with a query string like.
Example: Current Page URL:
http://www.example.org/index.php?id=1&tx_extbase_demo[foo]=123
Page-UID = 1
Now let's say I want current page without parameters but a section like:
http://www.example.org/index.php?id=1#foo
So addQueryString is not set and
parameter is 1 and
sectionMark #foo
This will reult in "#foo" being returned which means the endresult actually is:
http://www.example.org/index.php?id=1&tx_extbase_demo[foo]=123#foo
if ($sectionMark && !$tsfe->config['config']['baseURL'] && $page['uid'] == $tsfe->id && !trim($addQueryParams) && !($conf['addQueryString'] && $conf['addQueryString.'])) {
I think the !trim($addQueryParams) should catch this BUT because of
$addQueryParams = $conf['addQueryString'] ? $this->getQueryArguments($conf['addQueryString.']) : '';
Those parameters will not be filled in this case.
Updated by Gerrit Code Review about 9 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 http://review.typo3.org/43608
Updated by Gerrit Code Review about 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43608
Updated by Gerrit Code Review about 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43608
Updated by Gerrit Code Review about 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43608
Updated by Gerrit Code Review about 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43608
Updated by Markus Klein about 9 years ago
By reading the ticket, I don't understand the current behaviour vs the expected behaviour and a way to reproduce that.
Please provide more info here.
Updated by Andreas Allacher about 9 years ago
Actually. I thought it was clear but let's try again:
1.) Browse to page with id = 1
2.) Modify the content by adding a parameter, e.g.
page = PAGE page.10 = TEXT page.10.value = ORIGINAL [globalVar = GP:demo=1] page.10.value = MODIFIED page.10.typolink.parameter = 1 page.10.typolink.section = content page.10.typolink.addQueryString = 0 [global]
3.) Set:
config.absRefPrefix correctly
do NOT set config.baseURL
4.) Then access the page by using the corresponding parameter:
e.g.: index.php?id=1&demo=1
Now the link generated by typolink above will have
href="#content" set.
However, that is wrong as the URL we are corrently using is:
index.php?id=1&demo=1
and not
index.php?id=1
Therefore we only generate th anchor part of the URL and therefore we will not switch back to the ORIGINAL content.
Updated by Gerrit Code Review about 9 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43608
Updated by Gerrit Code Review about 9 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/43608
Updated by Anonymous about 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 54c98ec32133bcc3de3eb90a30029959fb52aea5.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed