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.

Comments

xano’s picture

Status: Active » Needs review
StatusFileSize
new1 KB
new1.79 KB
dawehner’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +WSCCI

I think this is the proper fix.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, drupal_sad_slug.patch, failed testing.

xano’s picture

drupal_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.

dawehner’s picture

Status: Needs work » Reviewed & tested by the community

So back to RTBC

catch’s picture

Status: Reviewed & tested by the community » Fixed

This 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.

xano’s picture

I was browsing the commit log and noticed that the last one is from 9 hours ago. Did your push fail?

catch’s picture

Yes :(

Pushed again.

Automatically closed -- issue fixed for 2 weeks with no activity.