Bug #91979
closeddetectDomainRecords.target is set but no target is in a-tag
100%
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
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.
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
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
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
Updated by Georg Ringer over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 37ea9780d92920813a5e1c9c5cd9cdb8dde3a447.