Add URL alter hook

Created on 9 September 2021, over 3 years ago
Updated 13 October 2023, about 1 year ago

Problem/Motivation

It might be convenient to allow modules to alter the URL redirected to from a /document/xxx request - my use case was that a client needed draft versions of documents, in which case the filefield path was altered with a '/draft/' prefix - while a published revision was still live. For some reason (content moderation not fully supported with media?), the file URL for a live media was generated from the latest (draft) revision, so an alter was needed to remove the draft prefix.

Proposed resolution

Attached patch adds a URL alter hook and .api.php file.

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇨🇦Canada bgilhome Victoria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024