I have installed pathauto
and implemented hook_node_insert in my module, the problem is when I use entity_uri
to get new node's URL I will get node/xxx
instead of pathauto url alias.
How can I get final URL of the node, after ALL other modules had their manipulations?
function HOOK_node_insert($node) {
$uri = entity_uri('node', $node);
$uri['path']; // this should be the final path
}