- π¦πΊAustralia VladimirAus Brisbane, Australia
Drupal 7 is no longer supported.
Issue is older than 10 years old.
Closing as outdated.
I've been pulling my hair out on this one for weeks, but I've finally figured it out.
Setup:
Using auto_entitylabel on a multilingual site which uses translated name values of taxonomy terms in the generated paths via pathauto. Saving a node sometimes results in generated paths with the term names translated in the incorrect languages. This is because during auto_entitylabel_set_title(), the multilingual titles are generated by token_replace() and entity_token_tokens(), an implementation of hook_token() hooks into this and creates metadata wrapper objects around relevant entities, caching objects in the process.
Placing the following code immediately after the multilingual title generation (around line 211 in entity_autolabel.module) fixes the problem, but also adds a significant amount of overhead as we are purging all static entity caches. If someone knows a better, more targeted method, I would suggest using that. In the meantime, I hope this can help another developer from going bald.
//Clear entity static caches, which now have been corrupted with translated versions of entities from above.
$entiy_info = entity_get_info();
$entity_types = array_keys($entiy_info);
foreach ($entity_types as $entity_type) {
$entity_controller = entity_get_controller($entity_type);
$entity_controller->resetCache();
}
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Drupal 7 is no longer supported.
Issue is older than 10 years old.
Closing as outdated.