Last commit added new url/path related tokens.
The [node-url] is already defined by notifications_content creating a nasty bug with pathauto when trying to clean a value that is actually an array (it was added twice one by token and other by notifications content).

Should this be fixed here in the token module because it was the last module that add it or it should be reported back to notifications module for not using a contextual token definition?

(in the case of notifications it should made changes in most of the default values breaking compatibility with existing notification settings and message templates)

A possible fix for token could be just change the name of node-url

These are other tokens defined by notifications_content module (line 847):
$tokens['node']['node-teaser'] = t('The node teaser.');
$tokens['node']['node-body'] = t('The node body.');
$tokens['node']['node-url'] = t('The node view url for read more links.');
$tokens['node']['node-teaser-raw'] = t('Unfiltered node teaser. WARNING - raw user input.');
$tokens['node']['node-body-raw'] = t('Unfiltered node body. WARNING - raw user input.');

Comments

dave reid’s picture

Status: Active » Closed (duplicate)

This will be fixed with #587148: Handle tokens correctly when more than one module defines a given token, although could you please file an issue to have the notifications_content remove or properly namespace its tokens?

jcmarco’s picture

Done: #845250: Duplicate [node-url] token definition with token module
Thank you for the fix and sorry for the duplication on that issue, I didn't find that so far away issue.

Mike at techtir’s picture

Since last update I get
"More than one module has defined the node-url token."
On every click of any custom URL

Is this a related issue?

dave reid’s picture

Are you using the notifications module?

Mike at techtir’s picture

yes.
I just now disabled it and the error does not appear in log anymore
I use

Path
Clean Pagination
Global Redirect

To do stuff with URLs.

Mike at techtir’s picture

I'm not sure what is now disabled with turning off the Modules causing the conflict?

dave reid’s picture

I don't understand your question in #6. This is a problem that needs to be fixed in the 'Notifications' module, not here. Please follow/subscribe to #845250: Duplicate [node-url] token definition with token module.

fabrizioprocopio’s picture

I never applied a patch, I'm not a coder.
I tried to read something, but may be I make harms to my website.
If I leave everything so, without patching anythings, what I risk?

fab