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
Comment | File | Size | Author |
---|---|---|---|
#5 | url_alias_description_update-2936402-3.patch | 2.92 KB | udayraj123 |
#3 | outputBug.PNG | 19.53 KB | udayraj123 |
#3 | drupalBug.PNG | 63.85 KB | udayraj123 |
Comments
Comment #2
udayraj123 CreditAttribution: udayraj123 commentedComment #3
udayraj123 CreditAttribution: udayraj123 commentedSteps 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
Comment #4
udayraj123 CreditAttribution: udayraj123 commentedComment #5
udayraj123 CreditAttribution: udayraj123 commentedThe patch is attached here