Project

General

Profile

Actions

Bug #87616

closed

Allow modifying link parameter in TypolinkModifyLinkConfigForPageLinksHookInterface

Added by Robert Vock about 5 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-02-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Epic #88027: Properly handle Hooks/Signals and EventsClosedBenni Mack2022-04-22

Actions
Related to TYPO3 Core - Task #101006: Remove deprecated functionality related to link handling and ContentObjectRendererClosedBenni Mack2023-06-12

Actions
Actions #1

Updated by Benni Mack about 5 years ago

  • Related to Epic #88027: Properly handle Hooks/Signals and Events added
Actions #2

Updated by Eric Harrer over 2 years ago

+1 Is there a chance this bug will be fixed in near future?

Actions #3

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.

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

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

Actions #8

Updated by Benni Mack over 2 years ago

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

Updated by Oliver Hader about 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];

Actions #10

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions #11

Updated by Benni Mack 11 months ago

  • Related to Task #101006: Remove deprecated functionality related to link handling and ContentObjectRenderer added
Actions

Also available in: Atom PDF