Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jan 2010 at 20:42 UTC
Updated:
29 Jun 2011 at 18:18 UTC
I got this error:
Fatal error: Cannot redeclare page_manager_node_edit_page_manager_tasks() (previously declared in /var/www/[mySite]/sites/all/modules/ctools/page_manager/plugins/tasks/node_edit.inc:11) in /var/www/[mySite]/sites/all/modules/ctools/page_manager/plugins/tasks/node_edit.inc on line 32
after an upgrade of Mobile Tools and Devel modules to their latest dev builds. The upgrade might be irrelevant, but it was the last change I recall making before I got this.
Will try to revert to the older versions of the upgraded modules and report back in a sec...
Comments
Comment #1
klonosUpdate:
... turns out this happens only after each time you try to flash site caches. If you do, a blank page with this error comes up.
To get out of it, I temporarily disabled ctools (renamed its folder since I couldn't get to the module's administration page - or any other page of my site). I then re-extracted both Mobile Tools and Devel latest dev packages in my ../sites/all/modules and finally renamed ctools module folder back to its original name. This way I got my site to work again, but flashing caches still creates this issue and I have to go through this whole procedure again and again.
I guess this is some sort of incompatibility between ctools and the Devel module.
The only way to 'safely' flash caches now is to first disable ctools, then flash, then re-enable ctools :(
PS: The weird thing is that line 32 in node_edit.inc has no code, only a single '}' closing the function page_manager_node_edit_page_manager_tasks()
...beats me :(
Comment #2
merlinofchaos commentedIf you're using devel.module, can you put a dsm(debug_backtrace()) right before the function declaration in that file and then duplicating the error? You might see the dsm() output on the next pageload since it's whitescreening. Possibly a dpr() would work better.
It seems like the file is getting included twice, but that should not be possible since everything uses include_once, so I want to see where the file is being included from.
Comment #3
klonosI got another similar error. This time it was:
Fatal error: Cannot redeclare ctools_node_form_attachments_ctools_content_types() (previously declared in /var/www/[mySite]/sites/all/modules/ctools/plugins/content_types/node_form/node_form_attachments.inc:8) in /var/www/[mySite]/sites/all/modules/ctools/plugins/content_types/node_form/node_form_attachments.inc on line 18
Again, the line mentioned only has a single closing '}'.
I've placed the debug function in this file, just right before the function ctools_node_form_attachments_ctools_content_types() and this is what I got:
Parse error: syntax error, unexpected T_FUNCTION in /var/www/[mySite]/sites/all/modules/ctools/plugins/content_types/node_form/node_form_attachments.inc on line 8
Any ideas?
Comment #4
merlinofchaos commentedI think that error indicates a missing ; in your debug function. =)
Comment #5
klonosok... me noob caveman :)
... still the error remains (only now, line # changed to 19 of course due to added debug line):
Fatal error: Cannot redeclare ctools_node_form_attachments_ctools_content_types() (previously declared in /var/www/[mySite]/sites/all/modules/ctools/plugins/content_types/node_form/node_form_attachments.inc:8) in /var/www/[mySite]/sites/all/modules/ctools/plugins/content_types/node_form/node_form_attachments.inc on line 19
How do I troubleshoot this further?
Comment #6
klonosI don't know if something changed in the latest 01/21/2010 dev build, but it seems that the issue doesn't occur anymore.
Please keep the issue open while I test for a few days and if everything seems ok, I'll close it. Thank you.
Comment #7
merlinofchaos commentedI think you might've had some kind of caching problem. I've seen APC do this on very very rare occasions.
Comment #9
Alexander Ufimtsev commentedGot this error upon update to 1.8 - thanks for mentioning APC - Apache restart helped.
Comment #10
klonosWell, if all it needed was a restart of the apache, then this explains what fixed the issue for me too back in January (my post in #6)
Comment #11
brettbirschbach commentedThanks for mentioning APC. Turned off apache, turned off APC, and then started apache. This error went away for me.
APC in windows seems to be giving me problems.