Bug #81202
closedlinkToTop in css_styled_content broken in TYPO3 7
100%
Description
Since config.prefixLocalAnchors was removed from the core with #65934 and outsourced into compatibility6 extension, all linkToTops are not working any more if realurl is used.
Testcase:
config { prefixLocalAnchors = all baseURL = http://www.example.com } page = PAGE page { 1 < styles.content.get }
Add a new content element and check the checkbox "Append with Link to Top of Page" in Access tab.
This is the broken typoscript setup in css_styled_content:
Expected:
<a href="path/to/page.html#">Link to top</a>
Actual Output:
<a href="#">Link to top</a>
with a baseurl set links to the root page.
Files
Updated by Simon Schaufelberger over 7 years ago
- Related to Bug #65934: Move prefixLocalAnchors to compatibility6 added
Updated by Simon Schaufelberger over 7 years ago
Found this snippet. Why not integrate it into the core?
tt_content.stdWrap.innerWrap2 = {LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:label.toTop} tt_content.stdWrap.innerWrap2.stdWrap { typolink.parameter.data = TSFE:id typolink.section = top wrap = <p class="csc-linkToTop">|</p> }
Updated by Christoph Lehmann over 7 years ago
Or maybe
tt_content.stdWrap.innerWrap2 = | <p class="csc-linkToTop"><a href="{getIndpEnv:TYPO3_REQUEST_URL}#">{LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:label.toTop}</a></p>
Updated by Susanne Moog about 7 years ago
- Category changed from Content Rendering to Frontend
- Complexity set to easy
Updated by Riccardo De Contardi over 6 years ago
- Sprint Focus set to On Location Sprint
Updated by Gerrit Code Review over 6 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/57774
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57775
Updated by Gerrit Code Review over 6 years ago
Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57775
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57778
Updated by Gerrit Code Review over 6 years ago
Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57778
Updated by Joerg Kummer over 6 years ago
To reproduce this issue, install EXT:reaurl & EXT:css_styled_content.
Create a subpage (you need a human speaking url path in frontend).
Create a standard content element, where you check 'Append with Link to Top of Page' under tab 'Appearance'.
Set TS template for this page (or pagetree) as root (option clear constants and setup) with setup as in this description and include css_styled_content extension template.
The 'Link to top' does not contain full path, without the patch in TYPO3 8 and 7.
Updated by Joerg Kummer about 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4c9d9254f5874911decc8434b48b3d276fadbce1.