Bug #15202
closed
links to pages with a different sys_domain record
Added by Robert Destigter almost 19 years ago.
Updated almost 6 years ago.
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)
Put this into the SETUP-Field of your TypoScript-Template:
config.typolinkCheckRootline = 1
Does this help?
Have a look at TSRef for details.
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?
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.
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>';
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.
tell me, is this problem solved with TYPO3 4.2 ?
Is this solved with TYPO3 4.2?
Resolved, no change required after a year without feedback.
- Status changed from Resolved to Closed
Also available in: Atom
PDF