Feature #92780

Provide Event after page URI has been generated

Added by Sebastian Michaelsen 7 months ago. Updated 6 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2020-11-05
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

After PageRouter->generateUri() has created a link to a page, an event should be dispatched that allows extensions to react to the created URI or modify it.

Whenever an extension author modifies a generated URL they would need to take care that the URL can be resolved again in the end.

Use Case 1 (URL modification):
Via event the generated page URI is modified in a way that url path slugs are rearranged. Once this modified URI is called, a middleware recognizes it and modifies it back, so TYPO3 can resolve it again.

Use Case 2 (URL Logging):
Sometimes you have errors reported or in your logs, where you ask yourself: How did anyone end up on that URL? Where and why was it generated? So it could be useful to maintain a log with debugging information whenever a new URI is generated.

#1

Updated by Sebastian Michaelsen 7 months ago

I created an extension which adds the functionality via xclass: https://github.com/smichaelsen/page-router-event

#2

Updated by Sebastian Michaelsen 7 months ago

  • Description updated (diff)
#3

Updated by Gerrit Code Review 7 months ago

  • Status changed from New to Under Review

Patch set 1 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/+/66900

#4

Updated by Gerrit Code Review 6 months 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/+/66900

#5

Updated by Gerrit Code Review 6 months 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/+/66900

#6

Updated by Gerrit Code Review 6 months ago

Patch set 4 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/+/66900

#7

Updated by Gerrit Code Review 6 months ago

Patch set 5 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/+/66900

Also available in: Atom PDF