Bug #81364

Epic #65814: Make Indexed search extbase plugin shine

Internal links get treated as external links by linkPage()

Added by Nico Niebergall over 2 years ago. Updated 7 months ago.

Should have
Indexed Search
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


I currently have the issue that indexed_search treats search result links as "external" when in reality, they are internal links. I'm referring to a specific part in indexed_search's source code; see explanation/details:

This (IMHO) wrong behaviour results in links not going through the TYPO3 URIBuilder (and therefore realURL), e.g. domain.tld/index.php?id=18 vs. domain.tld/contact.html. I tracked this down to \TYPO3\CMS\IndexedSearch\Controller\SearchController, line 1326 in the linkPage() function:

            if (!empty($this->domainRecords[$pageUid])) {
              // Handle external link
            } else {
              // Handle internal link

IMHO, the negation of empty() should be removed, e.g. "if there is no domain record, this is an external link.." instead of "if there is a domain record, this is an external link":

            if (empty($this->domainRecords[$pageUid])) {
              // Handle external link
            } else {
              // Handle internal link

If I remove the negation, the extension behaves as expected and shows the correct link(s), e.g. /contact.html instead of /index.php?id=18. Hopefully, this is an actual issue and not a result of an oversight of mine. ;-)

In any case, I hope someone more involved in the core's development can shed some light on this! If that's indeed the way to fix this, I'd also be willing to contribute this myself.

Thank you in advance!


#1 Updated by Jan Loderhose almost 2 years ago

I can confirm the finding and the suggested solution.

#2 Updated by Riccardo De Contardi over 1 year ago

  • Parent task set to #65814

#3 Updated by Riccardo De Contardi 7 months ago

Does this issue still happen on 9.5.5? As far as I can see, the function linkPage has changed from the one on version 8.7

Also available in: Atom PDF