Closed (fixed)
Project:
Default Content (Deprecated)
Version:
7.x-1.0-alpha9
Component:
Code
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2013 at 18:54 UTC
Updated:
18 May 2013 at 01:00 UTC
Fatal error: Cannot redeclare class defaultcontent_condition in /opt/lampp/htdocs/sites/all/modules/contrib/defaultcontent/plugins/defaultcontent_condition.inc on line 57
I just noticed this recently. Not sure how long it's been there. Any clues?
Comments
Comment #1
donpwinston commentedIt occurs whenever a cron job is run or I install a new module.
Comment #2
Jeffrey C. commentedCan you confirm this problem exists on a fresh Drupal 7 install?
Comment #3
jakerogers commentedIt did NOT exist on the fresh install of 7.14, which I have been running for over 6 months. I run cron automatically @ 3 hours and I just noticed the last run was nearly 3 weeks ago...try to run and get the Fatal error message. Thanks for any help.
Edit: I just remembered that about the same time I began having problems sending private messages...I get AJAX HTTP error code 200...this error pops up as I am typing in recipients name, but if you close and finish typing, the message is sent ok. Perhaps the two are related????????
Jake
Comment #4
Jeffrey C. commentedThis might be due to a conflict with some contributed modules. However, the highest priority is to resolve outstanding bugs that exist in a fresh install.
Comment #5
markhalliwellFatal error: Cannot redeclare class means that the class has already been declared.
This means one of two things in Drupal: you have two of the same modules in your site's file structure and Drupal is attempting to load both of them or your database registry is corrupt.
Locations you should check for duplication:
profiles/*/modules- Keep this version and remove the ones belowsites/all/modules- If it doesn't exist in the profiles modules dir, keep this one.sites/*/modules- If it doesn't exist in either of the above locations, you may have a registry conflict somehow.If you find an offending duplicate module, remove it. Your problem should go away then. If it doesn't, you may have to rebuild your database registry. Install and run the Registry Rebuild drush command to help remedy this issue if it persists.
Comment #6
donpwinston commentedThe file defaultcontent_condition.inc was in two places:
modules/contrib/defaultcontent/plugins/defaultcontent_condition.inc
and
modules/contrib/defaultcontent/context/plugins/defaultcontent_condition.inc
I removed it from modules/contrib/defaultcontent/plugins and the problem went away. I could not remove it from the context/plugins folder becasue then the whole site crashed. It expected it to be there.
Comment #7
jakerogers commentedWow!!! Outstanding...Finally, after 3+ weeks. I also had 2 copies located in
1) modules/defaultcontent/plugins
and
2) modules/defaultcontent/context/plugins
Like don, I deleted the one in 1) above and cron runs fine...no fatal errors...no errors finding usernames!!
Thank you donpwinston for the help...