Bug #87616

Allow modifying link parameter in TypolinkModifyLinkConfigForPageLinksHookInterface

Added by Robert Vock almost 3 years ago. Updated 14 days ago.

Status:
Resolved
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

Related to TYPO3 Core - Epic #88027: Properly handle Hooks/Signals and EventsIn ProgressBenni Mack2019-03-28

Actions
#1

Updated by Benni Mack almost 3 years ago

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

Updated by Eric Bode 5 months ago

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

#3

Updated by Benni Mack 22 days 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.

#4

Updated by Gerrit Code Review 18 days 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

#5

Updated by Gerrit Code Review 18 days 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

#6

Updated by Gerrit Code Review 14 days 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

#7

Updated by Gerrit Code Review 14 days 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

#8

Updated by Benni Mack 14 days ago

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

Also available in: Atom PDF