Multiple concurrent slashes in a path alias cause a 404

Created on 7 August 2023, 10 months ago

Problem/Motivation

If a path alias has multiple concurrent slashes it causes a 404 error instead of loading the page; in Drupal 8 the page would load regardless, in Drupal 9 it no longer loads the page.

We ran into this on a site that had ran on Drupal 8 for several years and was finally upgraded to D9.5.x.

Steps to reproduce

Create a path alias that contains multiple concurrent slashes, e.g. "/my//path".

Proposed resolution

Make the path field reject multiple concurrent slashes.
Provide an update script to replace all multiple concurrent slashes with a single slash.

Remaining tasks

Provide a patch / merge request with the changes.
Add test coverage.

User interface changes

The path alias field would not allow a path to be saved that contained multiple concurrent slashes.

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
PathΒ  β†’

Last updated 6 days ago

  • Maintained by
  • πŸ‡¬πŸ‡§United Kingdom @catch
Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

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

Comments & Activities

Production build 0.69.0 2024