When I go to the edit form for a node translation the alias is generated by pathauto.

I have different pathauto patterns to generate the different alias in different languages.

When I have nodes without path and I do a bulk update only the path for the origin language is created, not the translation.

Steps to reproduce

  • Set up a Pathauto pattern with [node:content-type]/[node:title].
  • Create a node in english
  • Translate that node in any other language
  • Make sure you have an alias for the node in english which will be like /product/name-of-product
  • Make sure you have a translated alias for the node in any other language (e.g. in french) /produit/nom-du-produit
  • Delete all aliases (uncheck Only delete automatically generated aliases if you manually set aliases previously)
  • Bulk generate aliases
  • Now confirm the translated node will have its [node:content-type] bit untranslated (e.g. /product/nom-du-produit)

Comments

rodrigoaguilera created an issue. See original summary.

damienmckenna’s picture

Component: Code » I18n stuff
jacov’s picture

+1

anavarre’s picture

I have troubles reproducing this. Could you please add a clearer step-by-step?

CharfatoS’s picture

Maybe related with this issue https://www.drupal.org/project/pathauto/issues/2982186 ... I have the same issue, Pathauto make correct path only when i do to edit node and uncheck, erase the path, and check again the automatic alias, and then save the content.

fabricet’s picture

Any news ?

anavarre’s picture

Issue summary: View changes
anavarre’s picture

Issue summary: View changes
anavarre’s picture

I forgot to say this earlier but I did reproduce the issue, thus the updated issue summary.

webchick’s picture

Priority: Normal » Major

This seems like a pretty big problem, given if you hit this issue it could break a bunch of your site's URLs at once.

fabricet’s picture

You reproduced the issue but did you find a fix?

deaom’s picture

I was able to reproduce the issue and discovered that the problem is in the token module itself. There is an open issue for that also #2945272: bulk generating nodes with [node:content-type]/[node:title] uses current language for [node:content-type] for all languages.
I applied the provided patch and it applies and works, so the bulk generate aliases are added correctly depending on the language and your translation of the content type.

berdir’s picture

Status: Active » Closed (duplicate)

Thanks for testing, yes this can't be fixed in pathauto, closing as a duplicate.