Last Updated: February 25, 2016
·
1.222K
· thezombieguy

Preserving english urls on Drupal 7 multilingual node save

When using nodeload/nodesave, if you have a pattern match url alias auto save, Drupal will try to resave the title of your content as the url. This is not good when you need to preserve the source english url for all locales. So when you call nodesave in your code, make sure to then update the path alias using pathsave or via an SQL wrapper function to update the path in the path alias table.

This is a bit of a tricky issue but when dealing with 13 locales and all translated node alias paths need to be english formatted, it can be problematic.