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

CommentFileSizeAuthor
entitylanguage_entitypath_1332096_1.patch1.51 KBmvdve

Comments

interdruper’s picture

Status: Needs review » Reviewed & tested by the community

Works fine for me. Thanks!

yalu’s picture

I'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

mvdve’s picture

I 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.

mvdve’s picture

Issue summary: View changes

Added link to module version

maciej.zgadzaj’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

This has been merged into Pathauto Entity in my sandbox (a fork of this module).

Should we mark it as fixed here then?

mvdve’s picture

Great thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.