Bug #97069 ยป core-fix-additional-params-in-record-linkhandler.diff
typo3/sysext/core/Classes/LinkHandling/RecordLinkHandler.php | ||
---|---|---|
namespace TYPO3\CMS\Core\LinkHandling;
|
||
use TYPO3\CMS\Core\Utility\HttpUtility;
|
||
/**
|
||
* Resolves links to records and the parameters given
|
||
*/
|
||
... | ... | |
$urn = $this->baseUrn;
|
||
$urn .= sprintf('?identifier=%s&uid=%s', $parameters['identifier'], $parameters['uid']);
|
||
if (!empty($parameters['parameters'])) {
|
||
$urn .= '&' . ltrim($parameters['parameters'], '?&');
|
||
}
|
||
if (!empty($parameters['fragment'])) {
|
||
$urn .= sprintf('#%s', $parameters['fragment']);
|
||
}
|
||
... | ... | |
throw new \InvalidArgumentException('The RecordLinkHandler expects identifier, uid as $data configuration', 1486155151);
|
||
}
|
||
return $data;
|
||
$result = [
|
||
'identifier' => $data['identifier'],
|
||
'uid' => $data['uid']
|
||
];
|
||
unset($data['identifier'], $data['uid']);
|
||
if (!empty($data)) {
|
||
$result['parameters'] = HttpUtility::buildQueryString($data, '');
|
||
}
|
||
return $result;
|
||
}
|
||
}
|
typo3/sysext/recordlist/Classes/LinkHandler/RecordLinkHandler.php | ||
---|---|---|
'data-identifier' => 't3://record?identifier=' . $this->identifier . '&uid=',
|
||
];
|
||
if (!empty($this->linkParts)) {
|
||
$attributes['data-current-link'] = GeneralUtility::makeInstance(LinkService::class)->asString($this->linkParts['url']);
|
||
$attributes['data-current-link'] = GeneralUtility::makeInstance(LinkService::class)->asString(
|
||
[
|
||
'type' => LinkService::TYPE_RECORD,
|
||
'identifier' => $this->linkParts['url']['identifier'],
|
||
'uid' => (int)$this->linkParts['url']['uid'],
|
||
'fragment' => $this->linkParts['url']['fragment'] ?? '',
|
||
]
|
||
);
|
||
}
|
||
return $attributes;
|