Closed (fixed)
Project:
Pathauto i18n
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Oct 2014 at 17:08 UTC
Updated:
20 Sep 2015 at 10:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sanchiz commentedhi @ceonizm, thank for the bug report.
Can you provide some background information which entity do you use?
I tested your patch and it broke creation of aliases for source language.
Thanks!
Comment #2
sanchiz commentedFeel free to reopen issue with more context.
Comment #3
PascalAnimateur commentedI'm having the same problem with duplicate URL aliases being created for taxonomy terms in the source language. I'm using title + entity_translation to translate the term's name and description. The patch from #2 seemed to fix the problem, but it didn't work when bulk updating the aliases.
I think that part of my problem was $entity->language not being defined because entity_translation uses $entity->translations->original instead.
So here's a patch that fixes the problem when using pathauto_i18n with entity_translation. This check should handle both cases (entity_translation / content translation) before being committed to pathauto_i18n.
Comment #4
PascalAnimateur commentedComment #5
PascalAnimateur commentedBetter check for the entity language.. previous patch caused problem with user entity saving.
Comment #6
sanchiz commentedtrigger bot
Comment #9
sanchiz commentedHi @PascalAnimateur,
Could you please try this patch? As I see entity always has language property even with entity_translation.
Please let me know if it works for you.
Comment #13
sanchiz commentedComment #14
sanchiz commentedRe-roll.
Comment #16
sanchiz commentedCommitted. Available now in 7.x-1.x-dev or in in 7.x-1.4 and later once released.