Bug #87616
closedAllow modifying link parameter in TypolinkModifyLinkConfigForPageLinksHookInterface
100%
Description
The PageLinkBuilder has a hook to modify the typolink-configuration with TypolinkModifyLinkConfigForPageLinksHookInterface:
PageLinkBuilder.php#L74
This Feature was introduced with #79121: Documentation for Feature-79121 (as a side-note: The link to the Typolink documentation is broken)
Unfortunately it is not possible to modify the 'parameter' field of the typolink configuration. (It will be ignored later on). I have a hook, which does the following (simplified):
public function modifyPageLinkConfiguration(array $linkConfiguration, array $linkDetails, array $pageRow): array { $linkConfiguration['parameter'] = 15; $linkConfiguration['section'] = 'c254'; return $linkConfiguration; }
This does not result in a link to Content-Element #c254 on PageID 15, but still links to the page in $pageRow.
Updated by Benni Mack over 5 years ago
- Related to Epic #88027: Properly handle Hooks/Signals and Events added
Updated by Eric Harrer almost 3 years ago
+1 Is there a chance this bug will be fixed in near future?
Updated by Benni Mack over 2 years ago
Hey,
the main issue is that this would require a change in the interface of the hook, thus be breaking for existing hooks completely. I think the best solution is to replace this with a (more flexible) PSR-14 event.
Updated by Gerrit Code Review over 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72948
Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72948
Updated by Gerrit Code Review over 2 years ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72948
Updated by Gerrit Code Review over 2 years ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72948
Updated by Benni Mack over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8dde7f04171cc3b1c3f0b254b1db639760b68e36.
Updated by Oliver Hader over 2 years ago
Just ran into this problem as well in TYPO3 v11. The only way I found, was to override existing PageLinkBuilder
in this particular project:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][PageLinkBuilder::class] = ['className' => EventPageLinkBuilder::class];
Updated by Benni Mack almost 2 years ago
- Status changed from Resolved to Closed
Updated by Benni Mack about 1 year ago
- Related to Task #101006: Remove deprecated functionality related to link handling and ContentObjectRenderer added