• RE: dbacu.com
    My WP install was fine until i just did an automatic prompted WP upgrade. All the plugins/themes were up to date before upgrading WP. The upgrade was “successful” and reported no problems. However:
    1 – after upgrading ALL my pages have a massive code dump at the bottom that appears to show content of ALL my pages. even my dashboard page has this dump. this occurred exactly after upgrading WP ten minutes ago, the site was fine before that.
    2 – after upgrading WP reports that i’m using a “nightly build” although i did not choose such an option. so i upgraded again to the latest version, it was “successful”, and i get the same message to update because of using a nightly build.

    i cannot find any mention of this, can anyone help please?

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter 10Ten

    (@10ten)

    update, cannot duplicate this problem when logged out as an admin. some local issue here.

    I am also experiencing this problem. Did you find a quick fix for it?

    Actually, I was able to fix it. The wordpress admin bar in 3.1 is bugged. Remove it via this code in your custom functions file:

    remove_action( 'init', 'wp_admin_bar_init' );
    foreach ( array( 'wp_footer', 'wp_admin_bar_render' ) as $filter )
    	add_action( $filter, 'wp_admin_bar_render', 1000 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_me_separator', 10 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_account_menu', 20 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_blogs_menu', 30 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_blog_separator', 40 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_bloginfo_menu', 50 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_edit_menu', 100 );
    remove_action( 'wp_head', 'wp_admin_bar_css' );
    remove_action( 'admin_head', 'wp_admin_bar_css' );
    remove_action( 'wp_footer', 'wp_admin_bar_js' );
    remove_action( 'admin_footer', 'wp_admin_bar_js' );
    remove_action( 'wp_ajax_adminbar_render', 'wp_admin_bar_ajax_render' );
    remove_filter( 'locale', 'wp_admin_bar_lang' );

    Thread Starter 10Ten

    (@10ten)

    are you really? i have had my site checked on multiple computers, multiple OS’s, and multiple configs and cannot duplicate, but i have a theory that it’s related to: 1) being logged into WP as an admin combined with 2) some plugin issue, possibly a security plugin.

    when logged in to the affected computer, clearing cache etc would not change the problem and the code dump appeared. but when i logged out as an admin the dump was gone. i do not have any debugging plugin or script running, so the dump is very mysterious at this point.

    by the way, the dump began with:

    Debugging blog #1 on [server address]
    
    PHP Version: 5.2.12
    
        * Object Cache
    
    Cache Hits: 578
    Cache Misses: 26
    
    Group: options
    Cache:
    
    Array
    (
        [alloptions] => Array
            (
    ...

    I think it is code from the admin bar that some dev forgot to comment out before checking it in. My bet is the next build won’t have the problem. I’ve read that the admin bar is buggy though.

    Thread Starter 10Ten

    (@10ten)

    ok thanks for that. i’ll try that if she shows up again.

    Hello, what is the specific file that needs to be updated? And is that code the updated that can be pasted in it?

    Many thanks for advising a fix!

    You can add the code provided by joshkerr to your theme functions file.

    Does it matter where it is added? Sorry, have not had to do code fixes in a long time in WP

    I just appended it to the very bottom of the theme functions file.

    I put it on the bottom, after the last > and before it, after –

    }

    function file_put_contents($filename, $data) {
    $fhandle = @fopen($filename, ‘w’);
    if (!$fhandle) {
    return false;
    } else {
    $fcontents = fwrite($fhandle, $data);
    fclose($fhandle);
    }
    return $fcontents;
    }

    }

    but it errored and showed the code on the menu, not sure if that was supposed to happen or not. Also, do I put in my server (if I can figure out) or is that just a default.

    Just add this:

    remove_action( 'init', 'wp_admin_bar_init' );
    foreach ( array( 'wp_footer', 'wp_admin_bar_render' ) as $filter )
        add_action( $filter, 'wp_admin_bar_render', 1000 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_me_separator', 10 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_account_menu', 20 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_blogs_menu', 30 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_blog_separator', 40 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_bloginfo_menu', 50 );
    remove_action( 'wp_before_admin_bar_render', 'wp_admin_bar_edit_menu', 100 );
    remove_action( 'wp_head', 'wp_admin_bar_css' );
    remove_action( 'admin_head', 'wp_admin_bar_css' );
    remove_action( 'wp_footer', 'wp_admin_bar_js' );
    remove_action( 'admin_footer', 'wp_admin_bar_js' );
    remove_action( 'wp_ajax_adminbar_render', 'wp_admin_bar_ajax_render' );
    remove_filter( 'locale', 'wp_admin_bar_lang' );

    in to the theme functions file. You can do that through Appearance >> Editor from the admin back end.

    Sorry to be such a pain, but where would I add it in the code, I tried start, bottom and when I click save, the next page loads with the code showing and nothing else.

    From the admin side go to Appearance >> Editor. Find “Theme Functions (functions.php)” in the list of files on the right. Click on that and add the code to the bottom of that file. Click “Update File” and you should be done.

    Added on bottom to Functions.php, update file –

    Parse error: syntax error, unexpected T_FOREACH, expecting T_STRING or T_VARIABLE or ‘$’ in /hermes/bosweb/web280/b2804/ipw.astriker/public_html/blog/wp-content/themes/atahualpa/functions.php on line 19

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Code Dump at bottom of every page after upgrading WP’ is closed to new replies.