Active
Project:
Title
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 May 2011 at 10:25 UTC
Updated:
14 Dec 2016 at 14:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
das-peter commentedRelated feature request in entity_translation module: #1155134: Integrate pathauto bulk generation
Comment #2
plachThe patch looks good apart from the minor issue below (I will fix it myself while committing it). I didn't actually tested it yet, hope to do it soon.
Missing space between the if keyword and the condition.
Powered by Dreditor.
Comment #3
dave reidShould use !empty($context['data'][$context['type']]) here as it may not be defined and will throw a PHP notice.
Powered by Dreditor.
Comment #4
joostvdl commentedsubscribe
Comment #5
calculus commentedsubscribe
Comment #6
das-peter commentedJust rerolled. Thanks @plach & @Dave Reid for the feedback.
Comment #7
renat commentedPatch from #6 works fine for me, see http://drupal.org/node/1155134#comment-4648088
Comment #8
plachComment #9
plachCommitted to HEAD.
Comment #11
stone_d commentedtitle-add-token-support.patch queued for re-testing.
Comment #15
lmeurs commentedHi,
On a multilangual website with the Internationalization, Entity translation, Title, Pathauto and Token modules installed it occurred to me that the title attributes of links in the language switchers were incorrect, so I started digging and noticed something else. I am not sure whether this is considered a bug or not, but I thought it was worth mentioning since it might cause other problems.
In short: when translating a localized term, Pathauto generates a path according to the default pattern for terms
[term:vocabulary]/[term:name]. This triggerstitle_tokens_alter()which callstitle_field_sync_get()which sets the term object'snameandname_originalproperties. These changes to the entity object are done to find a replacement for the token, but are also used by code executed aftertitle_tokens_alter()is done.The effects are:
locales_sourceandlocales_targetfor this taxonomy term. The source should be in the term's source language, but after saving a translation it's in the language of translation. (NB: I do not know why these records are created, since the target value is empty and translations are stored in their respective field tables)Though these effects seem rather harmless, it might cause trouble at other levels as well.
Workaround: use the
[term:vocabulary]/[term:name_field]pattern.Possible solution: clone the term object before sending to
title_field_sync_get():could become:
Hope this makes any sense!
NB: I tested this on a clean install at simplytest.me with named modules and i18n's submodule Taxonomy translation enabled. I added a 2nd language, set the vocabulary's translation mode to "Localize" and replaced the original name field for this module's name field.
Comment #16
polHi all,
Be aware that the committed patch in #6 might introduce security issue because the token values are not sanitized.
See this thread for more info: #2757739: Token value is not sanitized, when replaced from title field