Problem/Motivation
- Add a URL alias
- Visit the edit form
- Change the system path and leave the alias as it is
- Press Save
Expected result: The alias was updated
Actual result: An error message appears:
The alias is already in use in this language.
Proposed resolution
Remaining tasks
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2377343-url_alias-1-FAIL.patch | 2.29 KB | tim.plunkett |
| #1 | 2377343-url_alias-1-PASS.patch | 4.2 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettAdded tests and fixed it. The problem was that when checking for existing aliases, it was trying to use the new source, not the existing one.
Also removed some redundancy between the validate and submit.
Comment #3
tim.plunkettThis bug was introduced in #2209145: Move all path alias SQL queries to a single storage controller, when AliasStorage::aliasExists() was added. Previously $pid was always used in the query, and that issue switched to optionally using $source, which seems like an odd but purposeful change. I'll ping @slashsrm to take a look at this.
Comment #4
swentel commentedStill applies, looks good to me - cleanup is also fine.
Comment #6
alexpottThis issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed a77605d and pushed to 8.0.x. Thanks!