To create a extra path with for an other language then default, it is needed to set the language of pathauto_entity_update_alias().
The attached patch fixed this issue. This functionality is simular to the taxonomy update and node update functions.
This patch is based on the module version supplied in issue 1947226
| Comment | File | Size | Author |
|---|---|---|---|
| entitylanguage_entitypath_1332096_1.patch | 1.51 KB | mvdve |
Comments
Comment #1
interdruper commentedWorks fine for me. Thanks!
Comment #2
yalu commentedI'm not sure if it is just me but there seems to be an error due to module name conflict.
The part concerned In this patch:
+ // check if the language is set.
+ if (!isset($language)) {
+ $language = pathauto_entity_language($entity_type, $entity);
+ }
+
Machine name of this module is "pathauto_entity", and function "pathauto_entity_language" is not defined by this module. It is defined by "pathauto" module.
I had an error where function "pathauto_entity_language" was not found.
I'm not exactly sure the conditions to replicate this issue, but I did apply the patch in https://drupal.org/node/1947226#comment-7707665 first and then manually integrate this patch.
My workaround was to rename the module to something that does not confilict with pathauto's function.
Thanks
Comment #3
mvdve commentedI can't replicate your issue, but is sounds plausible.
the pathauto_entity_language() function is also used in an other function of pathauto entity: pathauto_entity_alias_form().
Without this patch, the same error should occur.
On the other hand there are a lot of pathauto native functions with the pathauto_entity name, so this needs some further investigation.
Comment #3.0
mvdve commentedAdded link to module version
Comment #4
maciej.zgadzaj commentedThis has been merged into Pathauto Entity in my sandbox (a fork of this module).
Should we mark it as fixed here then?
Comment #5
mvdve commentedGreat thanks.