Add an option to disable auto-updating for certain content types

Created on 1 March 2023, about 2 years ago

Problem/Motivation

A bit like described in the Drupal 7 Alias Lock Module we often run into the situation that we have certain "static" content types, whose URL-aliases should be automatically created by pathauto, but never changed afterwards.
Of course this could be done manually by the author, but typically the content creators are no technical experts and tend to forget unchecking the "Generate automatic URL alias" after creating the node.

Typically, this is the case for nodes, which are an essential part of the menu structure or even more important, are parent paths to other URLs in a tree folder structure.

It would be nice to have an option, presumably on the pattern form (/admin/config/search/path/patterns/{CONTENT-TYPE}) to set this behavior.

Steps to reproduce

  1. Create an url pattern for nodes (e.g. page) with dynamic parts like [node:title]
  2. Create a node with a static nature (e.g. page) node, with automatic alias generation turned on. Let's set the title "My title"
  3. See the URL alias generated properly: /my-title
  4. Edit the node and change the title to "My new title" without thinking about the results in the URL and have /my-new-title generated as new title without noticing it
  5. Argue about the wrong url structure and unwanted redirects, because "the only thing you wanted to to is changing the title" ;)
  6. Hope for an automatic solution, locking the URL after first creation by automatically unchecking "Generate automatic URL alias".

:)

Proposed resolution

Add an option to the pattern create / edit form (/admin/config/search/path/patterns/{CONTENT-TYPE})

Remaining tasks

  1. Discuss
  2. Implement
  3. Write tests
  4. Rewiew
  5. Release

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

Production build 0.71.5 2024