500 Server Error, TEMPLATEPATH not defined and a VERY weird fix
-
Fatal error: require_once() [function.require]: Failed opening required ‘TEMPLATEPATH/…
I got this error message unexpectedly while running the Launch Effect theme on a otherwise default WordPress installation every time I tried to submit the contact form.
Now I would have blamed the theme, but tried to trace the error. Going through the code file by file with a
die('here')
I finally ended up on lines 198-200 in wp-settings.php:foreach ( wp_get_active_and_valid_plugins() as $plugin ) include_once( $plugin ); unset( $plugin );
Trying to make sure this was the line causing the error, I put a simple
echo('here');
before and after the block. Turns out the first is displayed, the second not.So, to investigate which plugin broke the blog, I added a line for debug output:
foreach ( wp_get_active_and_valid_plugins() as $plugin ) print($plugin); include_once( $plugin ); unset( $plugin );
Much to my surprise, the file now worked. The fatal error was gone. So, in an attempt of utter irritation, I re-wrote the line to this:
foreach ( wp_get_active_and_valid_plugins() as $plugin ) (function(){}); include_once( $plugin ); unset( $plugin );
… and now everything works just fine.
Does anyone have any idea what the heck is going on here? I am very, very confused ??
- The topic ‘500 Server Error, TEMPLATEPATH not defined and a VERY weird fix’ is closed to new replies.