Bug #15202
closedlinks to pages with a different sys_domain record
0%
Description
Search results in the indexed_search extension that link to pages with a different sys_domain record in the page tree link to the current domain name.
(issue imported from #M1868)
Updated by Christian Trabold about 19 years ago
Put this into the SETUP-Field of your TypoScript-Template:
config.typolinkCheckRootline = 1
Does this help?
Have a look at TSRef for details.
Updated by Robert Destigter about 19 years ago
I tried the config.typolinkCheckRootline = 1 but it made no difference.
I'm wondering if I am using the wrong version of indexed_search. My current version is 2.1.3. But on an older typo3 installation I have more options in the info module.
Also the installed extension in the typo3conf folder is executed and not the one in the sysext folder. Does this make any difference?
Updated by Robert Destigter about 19 years ago
I solved the problem by changing the lines
search {
rootPidList =
page_links = 10
}
to
search {
rootPidList =
page_links = 10
detect_sys_domain_records = 1
}
in typo3conf/ext/indexed_search/ext_typoscript_setup.txt
but now the urls are not translated using Real URL also not in results of the active domain.
And www.mydomain.dk in the results is show as ww.mydomain.dk. The first letter is trimmed.
Updated by Robert Destigter about 19 years ago
The page id's are not translated to nice urls because the linkPage function in class.tx_indexedsearch.php returns the following:
return '<a href="'.$scheme.$firstDom.'/index.php?id='.$id.$addParams.'" target="'.$this->conf['search.']['detect_sys_domain_records.']['target'].'">'.htmlspecialchars($str).'</a>';
I commented this line and added:
$linkClass = new t3lib_tstemplate ;
$pageResult = $GLOBALS['TYPO3_DB']->sql(TYPO3_db, "SELECT * FROM pages WHERE uid=".$id) ;
$pageArray = mysql_fetch_assoc($pageResult) ;
$linkArray = $linkClass->linkData($pageArray, 0, 0, 0) ;
$pageNiceUrl = $linkArray['totalURL'] ;
return '<a href="'.$scheme.$firstDom.'/'.$pageNiceUrl.$addParams.'" target="'.$this->conf["search."]["detect_sys_domain_records."]["target"].'">'.htmlspecialchars($str).'</a>';
Updated by Robert Destigter about 19 years ago
Next thing I've changed is:
return ereg_replace("\/$","",$row["domainName"]);
to
if($_SERVER['HTTP_HOST'] == $row['domainName']) {
unset($row['domainName']) ;
}
return ereg_replace("\/$","",$row["domainName"]);
in the getFirstSysDomainRecordForPage function to ignore the sys_domain record when the results are from the active domain.
Updated by Benni Mack over 16 years ago
tell me, is this problem solved with TYPO3 4.2 ?
Updated by Christian Kuhn over 15 years ago
Resolved, no change required after a year without feedback.