Bug #16794

Disable section name link and eliminate wrong link format

Added by Andreas Kastl almost 15 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2006-12-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

Related issues

Related to TYPO3 Core - Feature #19465: Configuration enhancement for indexed_searchClosed2005-08-04

Actions
#1

Updated by Michael Stucki almost 15 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.

#2

Updated by Andreas Kastl almost 15 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

#3

Updated by Ralf Hettinger about 12 years ago

related to #9574 (patch 0009574_v7.patch)

#4

Updated by Gerrit Code Review over 8 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

#5

Updated by Ralf Hettinger over 8 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.

#6

Updated by Gerrit Code Review over 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20193

#7

Updated by Gerrit Code Review over 8 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20193

#8

Updated by Gerrit Code Review almost 7 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

#9

Updated by Gerrit Code Review almost 7 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

#10

Updated by Gerrit Code Review almost 7 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

#11

Updated by Anonymous almost 7 years ago

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

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF