- 🇺🇸United States ron_s
I won't open this issue because it says Drupal 7 is no longer supported, but there are a couple of bugs in the
menu_token_handler
validation function for 7.x-1.x-dev.First problem is a typo. The code for
$link_path_tokens
was copied for$link_title_tokens
, and clearly forgot to update one of the variables. The code says this:$link_title_tokens = array_intersect($link_path_tokens, $entities);
... and it should be this:
$link_title_tokens = array_intersect($link_title_tokens, $entities);
The second issue is extra tokens that have a type of
node
oruser
are considered invalid. A perfect example is mentioned in comment #3. The tokencurrent-user
is a completely valid user-type token, but the code only allows a user token if its type is set exactly touser
.I wrote a patch that fixes the typo and passes validation for any token that are of type "user" or "node". If any interest, see attached.