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.
Apparently the current version is not aware of multilingual sites.
Worse, if you have a multilingual site, not one alias will be created.
This is because of request_path() is also including the language prefix, current_path() is not.
Secondly, when an alias has been created, but you update the pattern afterwards, no new alias will be created.
I refactored page_manager_pathauto_ctools_render_alter() from scratch.
Patch attached.
Comment | File | Size | Author |
---|---|---|---|
#5 | page_manager_pathauto-not_lang_pattern_change_aware-2607436-5.patch | 2.98 KB | drupov |
#3 | language_pattern_updates_refactor-2607436-3.patch | 2.82 KB | betz |
#2 | language_pattern_updates_refactor-2607436.patch | 2.87 KB | betz |
Comments
Comment #2
betz CreditAttribution: betz as a volunteer commentedpatch
Comment #3
betz CreditAttribution: betz as a volunteer commentedAdded a drupal_goto() when a path has been saved.
Comment #4
kopeboy CreditAttribution: kopeboy commentedHello?
I need this to work well on a multilingual site, but I am no a developer (yet).
Comment #5
drupov CreditAttribution: drupov commented@betz good work.
There is one small change needed though: if a pattern changes the path should be updated - currently it gets created anew. The patch adds that.
Comment #6
drupov CreditAttribution: drupov commentedComment #7
drupov CreditAttribution: drupov commented@kopeboy if you need translations for your page manager paths, please check out https://www.drupal.org/node/2701187#comment-11045169
Comment #8
cimo75 CreditAttribution: cimo75 commentedThanks you working fine here.
Comment #9
cimo75 CreditAttribution: cimo75 commentedI am getting a
Drush command terminated abnormally due to an unrecoverable error.
error now, it may related to the goto as stated in
https://www.drupal.org/node/1140842
it should be wrapped in drupal_is_cli.
S.