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

klonos’s picture

Update:

... 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 :(

merlinofchaos’s picture

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

klonos’s picture

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

merlinofchaos’s picture

I think that error indicates a missing ; in your debug function. =)

klonos’s picture

ok... 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?

klonos’s picture

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

merlinofchaos’s picture

Status: Active » Fixed

I think you might've had some kind of caching problem. I've seen APC do this on very very rare occasions.

Status: Fixed » Closed (fixed)

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

Alexander Ufimtsev’s picture

PHP Fatal error:  Cannot redeclare ctools_node_created_content_type_render() (previously declared i
n /sites/all/modules/ctools/plugins/content_types/node_context/node_created.inc:23) in /sites/all/modules/c
tools/plugins/content_types/node_context/node_created.inc on line 39

Got this error upon update to 1.8 - thanks for mentioning APC - Apache restart helped.

klonos’s picture

Well, 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)

brettbirschbach’s picture

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