Bug #70147
closed
typolink section - addQueryString = FALSE only returns sectionMark even if there is a query string on current page
Added by Andreas Allacher almost 9 years ago.
Updated almost 7 years ago.
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.
- 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
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
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
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
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
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.
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.
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
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF