Allow path generation inside of a workspace

Created on 2 June 2022, over 2 years ago

Problem/Motivation

When creating or updating a node inside a workspace (core workspaces module), no alias is generated for the node. That's because of some condition in core itself as well as pathauto, which prevent generating an alias if the saved revision is not the default revision, which when saving inside workspaces can never actually be true.

Steps to reproduce

On Vanilla Drupal 9

  1. Install workspaces, pathauto
  2. Setup an alias pattern for the article content type with pattern /test/[node:title]
  3. In the live workspace, create an article content with title β€œhello”
  4. Switch to the β€œStage” workspace
  5. Edit the created article changing the title to β€œhello world” and save the node

Expected result: Url alias changes to /test/hello-world
Actual result: Url alias doesn’t change

Proposed resolution

Allow other modules to alter the conditions under which the path generation inside PathautoGenerator::updateEntityAlias() is or is not processed via an event. The event subscriber, which will allow update of aliases inside workspaces, will live in the workspaces module.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

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

Merge Requests

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