I am using the below code to get the top taxonomy term synonym and use that in the path alias with pathauto. It does not work when creating the node but works 100% of the time when "updating url alias" from the admin/content/node/overview page. Any ideas what I could be doing wrong? I thought it was conflicting with automatic nodetitles but I've disabled it for this content type and it still doesn't work.

Type: Node

 if ($node->taxonomy) { foreach($node->taxonomy as $term){
$term_array = taxonomy_get_synonyms($term->tid);
return $term_array[0];
}} 

Comments

interestingaftermath’s picture

Any help would be truly appreciated!

interestingaftermath’s picture

Desperate for help. Any ideas?

interestingaftermath’s picture

Component: User interface » Code
interestingaftermath’s picture

HAPPY to pay for a fix to this issue. It's important to me. Please?

YK85’s picture

subscribe

interestingaftermath’s picture

Although this exact issue isn't fixed, it's fixed for me here: #965702: Add a token to get the top Taxonomy Term Synonym

hanoii’s picture

Status: Active » Fixed

Sorry to come a bit late to this issue, and not 100% sure on how to add it. And also, is very difficult to provide support for very every single specific request that can achieve by this module, but... I think it didn't work like you made it because, IIRC, when you create a node, the $node->taxonomy array is not an array of term objects but rather an array of term IDs.

Status: Fixed » Closed (fixed)

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

RaulMuroc’s picture

Status: Closed (fixed) » Active

Similar thing proposed recently: https://drupal.org/node/1266020. Slight solution is performanced.

It is a quite interesting feature and needed as well as I saw in different posts. IT would be nice to get answer.

THx.

manuel.adan’s picture

Issue summary: View changes
Status: Active » Closed (outdated)