Bug #16794
closedDisable section name link and eliminate wrong link format
100%
Description
Section name is always formatted with a static link (anchor # + JavaScript code). Link is not really necessary and is formatted in a wrong way. config.prefixLocalAnchors does currently not affect this link due to hardcoding of a-tag, but is necessary, if e.g. using realurl and/or base URL in HTML header.
Bug:
- make link compliant to prefixLocalAnchors / xhtml_cleaning
Feature request:
- make this link generation configurable (enable / disable link generation for section names via TS). For "unknown sections" there is no link, too. A link is not necessary from my point of view (and is not compatible to accessibility standards).
Relevant code fragment from pi-class (CVS 1795):
750 $onclick = 'document.'.$this->prefixId.'[\''.$this->prefixId.'[_sections]\'].value=\''.$theRLid.'\';document.'.$this->prefixId.'.submit();return false;';
751 $sectionTitleLinked = '<a href="#" onclick="'.htmlspecialchars($onclick).'">'.htmlspecialchars($sectionName).':</a>';
(issue imported from #M4667)
Updated by Michael Stucki almost 18 years ago
Since you seem to have the solution ready, I would like you to provide a patch. I will have a look at it then.
Updated by Andreas Kastl almost 18 years ago
I just changed lines 750 and 751 to disable link generation completely, but this may not be the solution you are looking for:
$sectionTitleLinked = htmlspecialchars($sectionName);
I'm not really familiar with link generator classes / functions of typo3 and xhtml_cleaning mechanism.
The reason for the bug may be eventually that your link does not contain anchor name (only '#' instead of '#name'). Perhaps this hides it from xhtml cleaning (not tested)? Your other links inside browsebar (to link to anchors '#'+md5 of id) work very well and are cleaned out correctly.
It may be useful to modify following function as well since it uses static anchor in code and (in-accessible) javascript, too (don't know if and where it is used):
function makePointerSelector_link
Updated by Ralf Hettinger about 15 years ago
related to #9574 (patch 0009574_v7.patch)
Updated by Gerrit Code Review over 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20193
Updated by Ralf Hettinger over 11 years ago
I'd suggest to have a TS property which can turn off linking of section titles:
plugin.tx_indexedsearch.linkSectionTitles
So if there are problems with these "drill" links depending on setup of the system, one can turn of this hardcoded linking. It is still possible (and easy) to add such drill links on section titles using unobstrusive JavaScript instead.
Apart from that a no-brainer imo.
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20193
Updated by Gerrit Code Review over 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20193
Updated by Gerrit Code Review almost 10 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/20193
Updated by Gerrit Code Review almost 10 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/20193
Updated by Gerrit Code Review almost 10 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/20193
Updated by Anonymous almost 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 42dc199bf3be8e38604067d1fac6ee8c7901f66e.