Last token dev releases have added a new [node-url] token, this creates a conflict wit this module that defines too the same token, forcing a conflict error with other modules as pathauto.
As reported here #834484: Conflict with last added [node-url] token , the recommendation is remove that token because it was already defined in the token module or add a namespace to tokens defined by this module.
In any case token module has added a conflict resolution #587148: Handle tokens correctly when more than one module defines a given token but using a right namespace is required.

Comments

mariagwyn’s picture

I (and others it appears) are still having this issue. Can this be addressed? I am not sure how to correctly modify the module, though Dave gives a hint at: http://drupal.org/node/834484.

Thanks,
Maria

dave reid’s picture

Version: 6.x-3.x-dev » 6.x-4.x-dev
Category: feature » bug
Status: Active » Needs review
StatusFileSize
new2.01 KB

Patch against current development version. May also apply to other versions as well.

Naturalist’s picture

Tried but it doesn't work for 6x2.2 This is a great module could a new updated version could be released with a tested fix?
Thanks

shane birley’s picture

I can confirm this patch fails on 2.2 - a kick ass back-port patch from 4.x dev would be great.

The most extreme problem is nodes load blank pages due to the conflict and renders them useless - and not just a log entry. :)

dave reid’s picture

StatusFileSize
new1.58 KB

Patch against 6.x-2.x attached.

shane birley’s picture

Dave, remind me, if we ever meet - I must buy you beer.

Naturalist’s picture

I'll buy the next one!!!

roderik’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.44 KB

Thanks.
Thanks to Dave this is not a disaster (since Token only generates watchdog warnings now), but it would be nice if it can be incorporated soon.

Together with a change on the module page: "Requirements: Token >= 6.x-1.14 / 5.x-1.15"

Attached patch for 6.x-4.x (replacing #2) removes a duplicate semicolon, though.

Starminder’s picture

subscribe

skyredwang’s picture

subscribe

skyredwang’s picture

#5 patch works!

Anonymous’s picture

Subscribe

nally’s picture

subscribe

jdidelet’s picture

I confirm. the patch #5 is working.

TechnoBuddhist’s picture

Me too #5 is good, THANKS Dave.

I recently upgraded my Token module, presumably(I've not looked) it introduced the 'node-url', thus bringing us into this duplicate scenario!

Mike at techtir’s picture

Does the "patch" fix the Duplicate node-url error message I get in log every time a user defined URL is clicked? This is since upgrade of main Drupal last week.
if so
How is the patch applied and which link do I download?

I'm a bit confused.

Will the Module be updated soon?

danepowell’s picture

I can confirm that #5 solves the problem for 6.x-2.x - thanks!

@Mike - Search the Drupal documentation for "How to apply patches". This one is simple enough that you can just read the patch and manually apply the changes (delete two lines of code). Use the one on comment #5 if you have Notifications 6.x-2.x and #8 if you have 6.x-4.x

tomsm’s picture

patch #5 works!

Mike at techtir’s picture

@ Dane Powell Thanks
In Cygwin, navigate to the module's directory for your Drupal install
??
From http://drupal.org/node/620014

What?

I had the pain years ago of installing cygwin to test some linux C on my NT4.0 Windows X windows. In recent years any Linux C work I have done on Debian, Barak and Ubuntu Linux distro

I had presumed I can either use Notepad ++ or Textpad to edit the PHP (which I've done on Wordpress and vBulletin and custom projects in the past) or some sort of autopatch tool.

This sort of makes more sense
http://drupal.org/node/534548

However I currently don't have a Test site. Only the real one. But I do have backups of the files and the SQL database.

So given that I can restore the file and it's not a big patch I can do it manually in a text editor?

I just comment out or delete?

- $tokens['node']['node-url'] = t('The node view url for read more links.');
- $values['node-url'] = url('node/'. $node->nid, array('absolute' => TRUE));

I can't see anything that needs added?

Mike at techtir’s picture

OK great folks

I just had to remember to re-enable the permissions on content Notifications etc! No error messages about [node-url]
I did manual comment out of the two lines with the patch name in post #5
I saved original version 1st.
Finding the lines in Notepad++ easy.

We don't get many new users a week, I always subscribe to new users till I see what they up to.

dave reid’s picture

Title: Duplicate token definition with token module » Duplicate [node-url] token definition with token module

Adding better title to help others find this issue.

brentrobbins’s picture

Assigned: Unassigned » brentrobbins

Thanks, patch worked. Subscribe.

Dennis Cullen’s picture

# 5 works! Yay! Thanks

lolmaus’s picture

Subscribing

Starminder’s picture

Any chance this will make it into a build for those of use to lazy, stupid, or fearful of screwing up a patch? :)

hedac’s picture

thanks #5

jzornig’s picture

subscribe

jvieille’s picture

thanks #5
This was blocking cron

robin van emden’s picture

tested, works, please commit

debplatt’s picture

subscribe

brisath’s picture

Subscribe

j0nathan’s picture

Subscribing.

telechris’s picture

Subscribing. I think this is related to this issue as well - http://drupal.org/node/935614#comment-3548406

yngens’s picture

will the patch in#5 be comitted?

angelmax’s picture

subscribe. having all my sites with this issue. thanks

rpsu’s picture

#8 solved problem so far in 6.x-4.0-beta7.
Subscribing...

butler360’s picture

#5 works of course. Subscribing.

eft’s picture

subscribing

todd zebert’s picture

subscribe.

advseb’s picture

subscribe

koolkomputer’s picture

subscribe

jtjones23’s picture

subscribe

tibboh’s picture

subscribe

greggles’s picture

Issue tags: +gdolove

Based on #946086: Read more links in email notifications we needed the patch from Dave in #5.

Would be great to have this committed. If I could mark RTBC again I would.

gábor hojtsy’s picture

Indeed, this also causes a problem with tokens on localize.drupal.org. See #946520: Error in nofifications from localize.drupal.org - "Read more at Array".

jose reyero’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks.

I'll put out a stable release ASAP for 2.x branch

(Any of drupal.org sites running with the 4.x branch?)

greggles’s picture

I don't think any are running 4.x yet. I do hope to move g.d.o to that in the next few months (it's better, right?)

jose reyero’s picture

@greggles,

Though there are many improvements in 4.x, the current stable (2.x) is much better tested so maybe wait for now unless you need some new feature. It also needs to sync up again with latest OG. Atm we are working on the Drupal 7 branch instead.

Btw, I've just published a new (6.x.2.x) release.

kenorb’s picture

Thanks.

brisath’s picture

@Jose Reyero or others,
Do you recommend dropping down to the 2.x version if we are currently running 6.x-4.x-dev ? What kind of problems would you anticipate with reverting back? Or should I just wait on new releases of 4x?

Status: Fixed » Closed (fixed)

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

allan1015’s picture

I have the 6.x-4.0-beta7 and still have this issue
Using the latest Tokens 6.x-1.x-dev (2010-Dec-14)

I can confirm that the Patch #2 is NOT fully implemented in the beta7 release.
There are basically 3 parts in the patch, only one is in place in Beta7
When I hand patched the other two, the error went away

Part-1 - NOT IMPLEMENTED in Beta7
-    $tokens['node']['node-content']    = t('The fully rendered node content.');
-    $tokens['node']['node-url']      = t('The node view url for read more links.');
+    $tokens['node']['node-content']    = t('The fully rendered node content.');;

Part-2 - Implemented in beta7
-  if ($type == 'comment' || $type == 'all') {  
+  if ($type == 'comment' || $type == 'all') {
     $tokens['comment']['comment-url'] = t('The comment view url.');
     $tokens['comment']['comment-reply-url'] = t('The comment reply url.');
   }

Part-3 - NOT IMPLEMENTED in Beta7
-        $values['node-url'] = url('node/'. $node->nid, array('absolute' => TRUE));

Not sure why Beta7 only has part of the patch but it dfoes?

So in Beta7 in the notifications_content.module these two changes made the Duplicate Tokens go away:

Comment out these two lines (to make a complete patch):
- $tokens['node']['node-url'] = t('The node view url for read more links.');
- $values['node-url'] = url('node/'. $node->nid, array('absolute' => TRUE));

Allan

dandaman’s picture

Status: Closed (fixed) » Active

I also had this problem on 6.x-4.x-beta7 and after removing the two lines mentioned by Allan in #52 it now works correctly.

roderik’s picture

Well, then I repeat my suggestion to split off the whole token stuff into a separate small module, esp. since the 'node-content' token is one big hairy ball of hairiness. And because non-notifications modules want these tokens too.

See #736328: render the node more completely for [node-body] to better handle cck fields (and others)
Say the word and I'll start trying to get others to cooperate on this small module.

ju.ri’s picture

I also had this problem with 6.x-4.x-beta7 after updating token.module. The solution in #52 seems to fix it.

ryan_courtnage’s picture

subscribe. Using 4.x beta7

jose reyero’s picture

Status: Active » Closed (fixed)

It is fixed in the -dev version.

rwhite’s picture

Version: 6.x-4.x-dev » 6.x-2.2
Assigned: brentrobbins » Unassigned

The patch in #5 worked great - thanks.

Unfortunately, it only worked until Cron ran. When cron runs, the error in the logs does not return, but the node content that had not been showing (as also noted in #4), disappears once again. After running update.php, the content appears again. Obviously, I'd rather not have to run update.php after every cron job, so does anyone have an idea or can point me in the right direction for a fix?

rwhite’s picture

I apologize, I had a problem with my panels layout. Again, the patch in #5 worked perfectly. Thanks.

qiubosu’s picture

Component: Content subscriptions » Notifications
Status: Closed (fixed) » Active

in my drupal 6.22 site, in the ../admin/reports/status, there is below "Duplicate tokens" warning:

The following tokens are defined by multiple modules and may cause problems when performing token replacement.
* node:node-url (defined by modules: token, notifications_content)

the modules using are notifications-6.x-4.0-beta7.tar.gz and token-6.x-1.16.tar.gz. is there any patch available for resolving this issue? how to install the patch under Ubuntu environment?

Skidz’s picture

Subscribing. Same error as #60. Same modules. Same versions.

CraigBertrand’s picture

Same as #60 which patch should I use? Is it fixed in the dev?

Thanks for module!

ezeedub’s picture

Version: 6.x-2.2 » 6.x-4.0-beta7
StatusFileSize
new1.43 KB

Here's a patch that works against 4.0-beta7.

j0nathan’s picture

Status: Active » Reviewed & tested by the community

Patch in #63 removed the "Duplicate tokens" warning in admin/reports/status with Notifications 6.x-4.0-beta7.
Thanks

Skidz’s picture

#63 did the trick for me, although I had to apply it manually. I think the line numbers are offset. Basically just the two lines to delete. Thanks e.zeedub!

j0nathan’s picture

Status: Reviewed & tested by the community » Needs review

I also applied the patch manually because of a server without "git" and "patch" commands. I didn't tried to apply the real patch in #63.
Sorry for the confusion.

CraigBertrand’s picture

63 worked for me as well.

roderik’s picture

Status: Needs review » Closed (fixed)

This is fixed in the -dev version, so this issue should remain at status 'fixed'.

As of today, there are not many changes in the -dev version (2011-Feb-26). Except the translation directories are gone, which is a good thing. Unless anyone did custom hacks, they can safely install this dev version.

roball’s picture

Priority: Normal » Critical

I can confirm this bug exists in the latest current 6.x-4.x release, which is still 6.x-4.0-beta7 from 2010-08-01. Drupal's status report includes:

Duplicate tokens: The following tokens are defined by multiple modules and may cause problems when performing token replacement.

    node:node-url (defined by modules: token, notifications_content)

This bug prevents notifying the URL where the update happened, which is the main purpose of this module. Thus I have increased the Priority of this issue to critical.

However, the bug has already been fixed with committ http://drupalcode.org/project/notifications.git/commit/d33c4954892522658f9c25992e25b816582d24f8 on 2010-10-20, so updating 6.x-4.0-beta7 to the latest 6.x-4.x-dev will solve it.

ken hawkins’s picture

We stumbled into this one too, given the age of the current dev release, seems like it's time for another beta?

roball’s picture

@Ken Hawkins: agreed - maybe posting at #1571342: Notifications 6.x-4.0 release? may help getting a 4.x release sooner rather than later. Though would love to have #1772178: Provide a token that resolves into the recipient's RealName integrated first.