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.
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.
Comment | File | Size | Author |
---|---|---|---|
#6 | 1247966-subpath-recursive-and-depth-bug.patch | 5.19 KB | Dave Reid |
#5 | 1247966-4-path-recursion.patch | 3.36 KB | twistor |
#4 | 1247966-2-path-recursion.patch | 1.87 KB | twistor |
#3 | 1247966-1-path-recursion.patch | 628 bytes | twistor |
#1 | 1247966-path-recursion.patch | 563 bytes | twistor |
Comments
Comment #1
twistor CreditAttribution: twistor commentedComment #2
twistor CreditAttribution: twistor commentedComment #3
twistor CreditAttribution: twistor commentedThe last patch broke some things. Redirects for one.
Comment #4
twistor CreditAttribution: twistor commentedSo 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.
Comment #5
twistor CreditAttribution: twistor commentedAdded test to illustrate the problem.
Comment #6
Dave ReidThanks for helping push this. I merged the test into the existing test and cleaned some code up. I think this should be 100% now.
Comment #7
Dave ReidThe 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'.
Comment #8
Dave Reid#6 committed to Git.