Fatal Errors changing after changing functions.php
-
Hello, I’m a PHP/Javascript developer with some experience with WP, but I was called in on an emergency by a friend to help fix errors in their current WP site which is built on some crazy theme by this guy:
dressyourwp.com
I figured out that the problem is in the version of jQuery being used, so I attempted to add the jQuery migrate to the registered scripts by doing the following change:
// Add RSS links to <head> section automatic_feed_links(); // Load jQuery if ( !is_admin() ) { wp_deregister_script('jquery'); wp_register_script('jquery', ("https://code.jquery.com/jquery-1.10.2.js"), false); // ADDED THIS LINE ONLY wp_register_script('jquery-migrate', ("https://code.jquery.com/jquery-migrate-1.2.1.js"), false); // END OF EDIT wp_enqueue_script( 'jquery.colorbox', get_bloginfo('template_directory') . '/js/jquery.colorbox.js', array( 'jquery' ) ); wp_enqueue_script("prototype", get_bloginfo('template_url') . "/js/prototype.js"); wp_enqueue_script("scriptaculous", get_bloginfo('template_url') . "/js/scriptaculous.js"); wp_enqueue_script("glider", get_bloginfo('template_url') . "/js/glider.js"); wp_enqueue_script(" validation", get_bloginfo('template_url') . "/js/ validation.js"); }
When I uploaded ONLY THAT ONE CHANGE. The entire site now says:
Fatal error: Call to undefined function automatic_feed_links() in /data/…/htdocs/wp-includes/functions.php on line 4
I removed that line and uploaded the original functions.php and have the same error… I have no idea what happened or how it happened, but now a simple fix for a big problem has turned in to a MAJOR problem that I can’t seem to figure out.
I’ve commented out the automatic_feeds_link() function and then another function throws the same error… it’s like editing this single PHP file caused it to “recompile” and break the entire build… which doesn’t make sense since I was under the impression PHP didn’t compile.
Because of the complexity of the theme and the fact that I didn’t make it, I’m really apprehensive about removing it or changing anything else.
Can somebody please explain to me what happened? The Theme was loading up fine, i made no other changes… how can a single line (which is then removed) cause such destruction?
- The topic ‘Fatal Errors changing after changing functions.php’ is closed to new replies.