Given the token [node:source:url:path], the intention is to retrieve the aliased path of the translation source node.
What is actually happening is that the lookup is performed for the source node uri, but using the current language context.

Comments

ciss’s picture

Status: Active » Needs review
StatusFileSize
new997 bytes

ciss’s picture

I realized that there are two aspects of the previous patch that prevent it from ever getting committed:

  1. It changes the current behavior, possibly breaking sites that already use node:source:url tokens.
  2. There's no way to get the current language's alias for a source node (e.g. node:source:menu-link:parent:url).

The attached patch reverts the earlier change and instead introduces a new node token "source-with-context" that passes along the source node language.
So instead of using [node:source:url:path] one would use [node:source-with-context:url:path].

chris matthews’s picture

The 4 year old patch in #3 to token.tokens.inc applied cleanly to the latest token 7.x-1.x-dev and if still applicable needs to be reviewed.