Closed (fixed)
Project:
FileField
Version:
6.x-3.0-rc1
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2009 at 01:25 UTC
Updated:
12 Jan 2011 at 02:19 UTC
PHP Fatal error: Cannot redeclare filefield_token_list() (previously declared in /var/www/servers/ap24/version2/sites/all/modules/filefield/filefield_token/filefield_token.module:7) in /var/www/servers/ap24/version2/sites/all/modules/filefield/filefield.token.inc on line 29
Comments
Comment #1
bennos commentedsorry there is an "a" missing in the title.
WOD with upgrade from beta3 to Rc1
Comment #2
quicksketchThe FileField Token module has been removed, it's now just filefield.token.inc. Just delete the filefield_token directory. It's not part of the tarball, perhaps you updated via CVS but didn't use the '-d' option to delete old files?
Comment #3
quicksketchComment #4
bennos commentedno, only copied the RC1 over the existing module.
will wipe it out and and move to RC1.
thx
Comment #5
toddtomlinson commentedSame problem as mentioned by others above. I downloaded the latest from Drupal.org -- uploaded and had the Cannot redeclare filefield_token_list() error. I'm sure that a lot of people are going to have the same problem.
Comment #6
jdlind38 commentedSame issue
Comment #7
bennos commentedOk. delete the beta3 and then copy the rc1 in the modules folder. this works.
Comment #8
quicksketchYes, please replace the entire module directory. Updating only certain files sounds like something that will get you into trouble.
Comment #9
mudd commentedIs FileField Token compatable with FileField-3.0-RC1?
Here and in thread #421556: fatal error Cannot redeclare filefield_token_list folks keep saying "delete FF foleder before replacing it with RC1" -- I think meaning to convey that Token is causing the problem and should be removed. To that I say, sure, when we upgrade something like CCK or FF we're going to replace the each sub module (e.g. FF-Token) unless you tell us 1) there's an incompatibility, 2) all the functionality of Token is included elesewhere (and tell us where) so don't reinstall it, and 3) include this statement in a formal format, say in the release notes.
Thanks.
Comment #10
mudd commentedReopening.
Comment #11
quicksketchI've updated the release notes with a note about FileField Token.
Token (token.module) is not causing a problem. You just need to delete the filefield_token directory since this module is no longer needed.
Here's a good post about properly updating a module:
http://groups.drupal.org/node/19513
Unfortunately I couldn't find any real good doc pages, but the basic procedure:
Do not simply untar the new version into the old module directory. For as people are noticing, this doesn't account for when a file is deleted or renamed.
Comment #12
awolfey commentedI think this version needs to uninstall the file_field token module through update.php to remove it from the system table, or it will be there forever.
Comment #13
quicksketchawolfey: filefield.install does do this:
Comment #14
awolfey commentedOK. I must have screwed something up.
Comment #15
madlee commentedthanks.
Comment #16
Patroclas commentedI have a serious problem with this. I got the above error upgrading from 6.x-3.0-alpha7 to 6.x-3.0-rc1. I deleted the filefield folder and uninstalled the module. Then uploaded 6.x-3.0-rc1. I am now getting this error
Call to undefined function filefield_elements() in \sites\all\modules\imagefield\imagefield.module on line 84and can't get into admin.
I have also attempted to upgrade imagefield from 6.x-3.0-beta2 to 6.x-3.0-rc1 to see if that helped but no.
This is on my local test site, but I do have a production site running the same versions (yes, I know, maybe I shouldn't) so I do need to get this sorted out.
I would be very grateful for any help.
Comment #17
quicksketchYou uninstalled the module when upgrading!? That's extremely dangerous, you very well could delete all the FileField content on your site. You don't need to uninstall or disable a module when updating (nor should you). See the directions in #11.
It sounds like you somehow have ImageField installed but not FileField now. You can try manually disabling ImageField by setting the status column to "0" in the system database table, then emptying the cache database table. That should let you access admin/build/modules and turn back on both modules, then run update.php.
Comment #18
Patroclas commentedThanks for your reply quicksketch. Yes I know that was stupid.
I managed to roll back my test site and then do the upgrade properly as suggested. I had got into bad habits not deleting the module folder before uploading the new version. Thanks again.
Comment #19
quinti commentedbuahs..., thanks....
i'ts very dangerous..., only activating "FileField Tokens 6.x-3.0-alpha7 - Token Integration for FileField."
the system down....
thank you very much
Comment #20
AlexisWilke commentedNote, I bump in the same issue and deleting and re-extracting the tarball fixed it immediately. 8-)
Thank you.
Alexis
Comment #22
artefatta commentedGot the same issue:
Thanks, deleting the filefield_token directory helped me.
Comment #23
ClearXS commentedMight have found the solution for new installs:
http://drupal.org/node/787334
Comment #24
rikimaru0007 commentedThank you Sir quicksketch for this simple explanation that solved my problem.