Project

General

Profile

Actions

Bug #91979

closed

detectDomainRecords.target is set but no target is in a-tag

Added by Joe Jones over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
Start date:
2020-08-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.3
Tags:
detectDomainRecords target search result
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

Dear dev-team,

I had problems, giving the links of the searchresults a target. In the Dokumentation there is detectDomainRecords.target, but is has no effect. I checkt the sourcecode and found the mistake in Classes/Controller/SearchController.php:

 protected function preparePageLink(int $pageUid, array $row, array $urlParameters): array
    {
        $target = '';
        $uri = $this->controllerContext->getUriBuilder()
                ->setTargetPageUid($pageUid)
                ->setTargetPageType($row['data_page_type'])
                ->setUseCacheHash(true)
                ->setArguments($urlParameters)
                ->build();

        // If external domain, then link to that:
        if (!empty($this->domainRecords[$pageUid])) {
            $scheme = GeneralUtility::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://';
            $firstDomain = reset($this->domainRecords[$pageUid]);
            $uri = $scheme . $firstDomain . $uri;
*********   $target = $this->settings['detectDomainRecords.']['target'];*********
            print_r( $this->settings['detectDomainRecords']['target']);
        }

        return ['uri' => $uri, 'target' => $target];
    }

The marked line must be:

$target = $this->settings['detectDomainRecords']['target'];

Maybe you can verfy this and patch it the next time.

Thank you and regards
Martin

Actions

Also available in: Atom PDF