It doesn't matter what you set the depth to. Subpathauto will find it! The problem is subpathauto_url_inbound_alter() calls subpathauto_lookup_subpath() which calls drupal_get_normal_path() which calls subpathauto_url_inbound_alter(). Wash, rinse, repeat until path is found.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

twistor’s picture

FileSize
563 bytes
twistor’s picture

Status: Active » Needs review
twistor’s picture

FileSize
628 bytes

The last patch broke some things. Redirects for one.

twistor’s picture

So I realized that the string walking in subpathauto_lookup_subpath() doesn't work at all. This changes that to something that's simpler for me to understand and works.

twistor’s picture

Added test to illustrate the problem.

Dave Reid’s picture

Thanks for helping push this. I merged the test into the existing test and cleaned some code up. I think this should be 100% now.

Dave Reid’s picture

The big problem with the patch in #5 is that once it finds a matching sub-path it will return the path prefix in reversed order. On your site if you were to go to $alias . '/a/b' - you would see that $_GET['q'] would be 'node/[nid]/b/a'.

Dave Reid’s picture

Status: Needs review » Fixed

#6 committed to Git.

Status: Fixed » Closed (fixed)

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