Problem/Motivation

Adding a slash at end of a URL alias in "Add Content" option results in page not found error at the url.

Steps to reproduce the bug -
1. goto Add Content, fill in the required fields
2. scroll down to find URL settings tab. There they have already mentioned not to use a trailing slash for aliases, but to produce this bug you should type in 'somename/'
3. Now save changes. It will redirect you to the alias, but you'll get the page not found error.

Screenshots : https://imgur.com/a/hruq3
The same are attached as files as well

Proposed resolution

Since this problem is because browsers simply ignore a trailing slash in URLs, while our alias database won't know that.
Escape the trailing slash while storing the alias at backend, and/or alert user at frontend if entered a trailing slash.

Remaining tasks

None

User interface changes

None.

API changes

None

Data model changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

udayraj123 created an issue. See original summary.

udayraj123’s picture

Issue summary: View changes
Status: Closed (works as designed) » Active
udayraj123’s picture

FileSize
63.85 KB
19.53 KB

Steps to reproduce the bug -
1. goto Add Content, fill in the required fields
2. scroll down to find URL settings tab. There they have already mentioned not to use a trailing slash for aliases, but to produce this bug you should type in 'somename/'
3. Now save changes. It will redirect you to the alias, but you'll get the page not found error.

Screenshots : https://imgur.com/a/hruq3
The same are attached as files as well

udayraj123’s picture

Issue summary: View changes
udayraj123’s picture

The patch is attached here