Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you create two routes of which the paths are identical, except that the last fragment of one route is a fixed string, and of the other route it is a slug, one of them always takes precedence.
/foo/bar
/foo/{baz}
The route with the slug always takes precedence. The attached patch, made by dawehner, demonstrates the failure.
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal_2036241_1.patch | 1.79 KB | Xano |
#1 | drupal_sad_slug.patch | 1 KB | Xano |
drupal_sad_slug.patch | 1 KB | Xano | |
Comments
Comment #1
XanoComment #2
dawehnerI think this is the proper fix.
Comment #4
Xanodrupal_sad_slug.patch contains the test that exposes the bug and fails as expected. drupal_2036241_1.patch contains both the fix and the test and passes as expected.
Comment #5
dawehnerSo back to RTBC
Comment #6
catchThis would affect node/%node vs. node/add if those had been converted already.
Committed/pushed to 8.x.
Also opened #2040571: Missing index on router table.
Comment #7
XanoI was browsing the commit log and noticed that the last one is from 9 hours ago. Did your push fail?
Comment #8
catchYes :(
Pushed again.