Do not create redirect if destination is not accessible

Created on 21 July 2022, over 2 years ago
Updated 28 November 2024, 24 days ago

Problem/Motivation

This is the same issue as #1911238: Add option to create redirects only if node is published , but for Drupal 8+ and with the intention to create an entity type agnostic solution.

Original issue description:

When posts are in draft unpublished state, titles and path may change quite a bit. Redirects for these changes can be extraneous on many (if not most) sites. It would be nice to have the option to have Redirect module kick in to create automatic redirects only if the node has already been published with a different path.

Steps to reproduce

Enable automatic redirects and update the path alias of an unpublished node. A redirect will be created, but it's useless since the path was never public.

Proposed resolution

Check whether the redirect url is accessible for anonymous users before saving the automatic redirect.

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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