Closed (fixed)
Project:
Token
Version:
7.x-1.3
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2012 at 09:33 UTC
Updated:
9 Sep 2016 at 22:36 UTC
Jump to comment: Most recent
Hi all,
When i am upgrading token module from "7.x-1.0-beta4" to "7.x-1.3", got an error
"Fatal error: Cannot redeclare token_replace() (previously declared in /drupal7/includes/token.inc:79) in /drupal7g/sites/all/modules/token/token.module on line 216".
Please give me suggestions.
Comments
Comment #1
saiprasad kandavalli commentedPlease reply me asap
Comment #2
saiprasad kandavalli commentedfixed.
Comment #3
ronline commentedHI saiprasad.
I am having the same prob during the upgrade from d6 to d7.
Could you please post what was the soultion for your case ?
Thx
Comment #4
saiprasad kandavalli commentedHi ronline,
its fixed on next version of token module (7.x-1.4)
Comment #5
EffortlessHR commentedThanks devs for the prompt fix.
Comment #6
dave reidFunny, I nothing changed with token_replace() because it's provided by Drupal core and not Token module. You must have had some outdated code, or something duplicate somewhere. I didn't fix anything.
Comment #7
ronline commentedIssue still there.
[Sat Mar 02 16:16:14 2013] [error] [client 192.168.1.12] PHP Fatal error: Cannot redeclare token_replace() (previously declared in /var/www/ronline/www/includes/token.inc:79) in /var/www/ronline/www/sites/all/modules/token/token.module on line 216
Isn’t it related to including token in D7 core?
We can see that the function is firstly being declared in www/includes/token.inc and then it clashes with sites/all/modules/token/token.module.
Comment #8
dave reidYou must be using the Drupal 6 version of the module with Drupal 7 core, which of course will cause lots of problems.
Comment #9
dave reidComment #11
dkl4 commentedI ran into this during a D6 to D7 upgrade. It was kind of an "order of operation" error.
I was upgrading modules one-by-one, and I still had a D6 version of token hanging around when I upgraded to the D7 version of pathauto (which requires D7 version of token).
Deleting the old D6 version of token first removed the error.