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.
Problem/Motivation
Add to the path something like 'demandes-d’accès-à-l’information-complétées' and it goes into an endless loop until it eventually times out.
Proposed resolution
Use explode and implode instead of strrpos and substr.
Remaining tasks
* Add patch.
Comment | File | Size | Author |
---|---|---|---|
#6 | path_alias_xt_2341203_fix_endless_loop_1.patch | 1.81 KB | Bogdan1988 |
#2 | path_alias_xt_2341203_fix_endless_loop.patch | 1.81 KB | Fabianx |
Comments
Comment #1
Fabianx CreditAttribution: Fabianx commentedHere is a patch.
Comment #2
Fabianx CreditAttribution: Fabianx commentedThe reason is that strrpos is not unicode safe, using explode / implode however works.
Last patch missed one drupal_substr usage.
Comment #3
catchPatch looks good.
Comment #4
Bogdan1988 CreditAttribution: Bogdan1988 commentedFor me this patch doesn't work for edit pages. I had to change this line
$path = $src . '/' . implode('/', $path_suffix);
Only after adding extra '/' edit pages work well. Thank you.
Comment #5
Fabianx CreditAttribution: Fabianx commentedCNW based on that comment
Comment #6
Bogdan1988 CreditAttribution: Bogdan1988 commentedComment #7
RdeBoerThanks Fabianx and Bogdan1988 for the combined effort and patch!
Hope to get to this soon.
Rik
Comment #8
Fabianx CreditAttribution: Fabianx commentedThanks, RdeBoer
Comment #9
Bogdan1988 CreditAttribution: Bogdan1988 commentedThank you, RdeBoer
Comment #13
adriancidThanks @all for the patch.