I have a brand new 5.2 install and I tried to install the Token module (http://drupal.org/project/token) and I get:
Fatal error: Cannot redeclare token_install() (previously declared in /home/site/www/modules/token/token.install:5) in /home/site/www/sites/all/modules/token/token.install on line 4
I took the 'official' release of Token: 5.x-1.8.
Any ideas?
not sure if this is related, but it looks like this issue is only addressed in the dev version: http://drupal.org/node/115664
Fred Jones wrote:
I have a brand new 5.2 install and I tried to install the Token module (http://drupal.org/project/token) and I get:
Fatal error: Cannot redeclare token_install() (previously declared in /home/site/www/modules/token/token.install:5) in /home/site/www/sites/all/modules/token/token.install on line 4
I took the 'official' release of Token: 5.x-1.8.
Any ideas?
sander-martijn wrote:
not sure if this is related, but it looks like this issue is only addressed in the dev version: http://drupal.org/node/115664
I found an older version and installed that and it works. But my error was with 'official' not 'dev'
Thanks.
Fred Jones wrote:
I have a brand new 5.2 install and I tried to install the Token module (http://drupal.org/project/token) and I get:
Fatal error: Cannot redeclare token_install() (previously declared in /home/site/www/modules/token/token.install:5) in /home/site/www/sites/all/modules/token/token.install on line 4
I took the 'official' release of Token: 5.x-1.8.
If you look at the error message, it's really easy to see what's wrong:
/home/site/www/modules/token/token.install /home/site/www/sites/all/modules/token/token.install
You have two copies of token.module where Drupal can read it. This will always lead to very strange errors. Remove one immediately.
Fred Jones wrote:
You have two copies of token.module where Drupal can read it. This will always lead to very strange errors. Remove one immediately.
Oh. I am an idiot. I didn't need to upload it as it already came with Drupal!
No, it doesn't come with Drupal. The one that's in your modules directory must have been put there.
On 10/10/07, Fred Jones fredthejonester@gmail.com wrote:
You have two copies of token.module where Drupal can read it. This will always lead to very strange errors. Remove one immediately.
Oh. I am an idiot. I didn't need to upload it as it already came with Drupal!
It shouldn't have - where did you download your copy of Drupal?
Greg
On 10/10/07, Fred Jones fredthejonester@gmail.com wrote:
I have a brand new 5.2 install and I tried to install the Token module (http://drupal.org/project/token) and I get:
Fatal error: Cannot redeclare token_install() (previously declared in /home/site/www/modules/token/token.install:5) in /home/site/www/sites/all/modules/token/token.install on line 4
I took the 'official' release of Token: 5.x-1.8.
Any ideas?
I didn't find any mentions of this at http://drupal.org/search/node/Cannot%20redeclare%20token_install nor http://www.google.com/search?q=Cannot%20redeclare%20token_install
If we look at the file itself, it's hard to see what would cause that error:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/token/token.ins...
Perhaps you could try completely deleting the entire folder and downloading it fresh?
Thanks, Greg