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

saiprasad kandavalli’s picture

Please reply me asap

saiprasad kandavalli’s picture

fixed.

ronline’s picture

HI 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

saiprasad kandavalli’s picture

Hi ronline,
its fixed on next version of token module (7.x-1.4)

EffortlessHR’s picture

Thanks devs for the prompt fix.

Dave Reid’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Fixed

Funny, 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.

ronline’s picture

Category: support » bug
Status: Fixed » Active

Issue 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.

Dave Reid’s picture

You must be using the Drupal 6 version of the module with Drupal 7 core, which of course will cause lots of problems.

Dave Reid’s picture

Category: bug » support
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

dkl4’s picture

Issue summary: View changes

I 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.