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 #1

Updated by Georg Ringer over 4 years ago

  • Status changed from New to Under Review

thanks for the report. can you check out the change at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65285

I did a different approach as otherwise `detectDomainRecords =0` needs to be detected as well.

Actions #2

Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65285

Actions #3

Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65285

Actions #4

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65416

Actions #5

Updated by Georg Ringer over 4 years ago

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

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF