Allow path generation inside of a workspace (core)

Created on 2 June 2022, about 2 years ago
Updated 29 March 2024, 3 months 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 value used for the entity url generation inside EntityBase::toUrl() via an event. The event subscriber, which will allow update of aliases inside workspaces, will live in the workspaces module.

✨ Feature request
Status

Closed: duplicate

Version

11.0 🔥

Component
Workspaces  →

Last updated 8 days ago

No maintainer
Created by

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.69.0 2024