• After upgrading to 3.6, I can no longer get into my dashboard. I get a message:

    Fatal error: require_once() [function.require-once]: Cannot redeclare class custom_image_header in /home/content/21/10789321/html/wp-includes/theme.php on line 1404

    The website was ust fine when I just go to it in another browser window, just the Dashboard seems to be blocked.

    Godaddy reset my theme to twentythirteen and I could get in. This happened on both of my sites that use the same theme (Back My Book). I’m wondering why an upgrade would impact a perfectluy fine website?

    Any ideas would be welcome. I can’t seem to find the file theme.pnp to look into it myself.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • As the error states you have declared custom_image_header already and it is attempting to redeclare it within theme.php on line 1404.

    Thread Starter asiccan

    (@asiccan)

    Thanks Evan

    where can I find that file “theme.php” to fix it? Also wondering what changed that it now doesn’t work anymore.

    Thread Starter asiccan

    (@asiccan)

    I have found the file. Now the challenge is how to fix it :):)

    What appears on line 1404 of that file?

    Thread Starter asiccan

    (@asiccan)

    Below is a snippet of the code. Line 1401 is the one that (I hope) shows in bold. I’ve copied it out here as well:
    require_once( ABSPATH . ‘wp-admin/custom-header.php’ );

    * Registers the internal custom header and background routines.
    *
    * @since 3.4.0
    * @access private
    */
    function _custom_header_background_just_in_time() {
    global $custom_image_header, $custom_background;

    if ( current_theme_supports( ‘custom-header’ ) ) {
    // In case any constants were defined after an add_custom_image_header() call, re-run.
    add_theme_support( ‘custom-header’, array( ‘__jit’ => true ) );

    $args = get_theme_support( ‘custom-header’ );
    if ( $args[0][‘wp-head-callback’] )
    add_action( ‘wp_head’, $args[0][‘wp-head-callback’] );

    if ( is_admin() ) {
    require_once( ABSPATH . ‘wp-admin/custom-header.php’ ); $custom_image_header = new Custom_Image_Header( $args[0][‘admin-head-callback’], $args[0][‘admin-preview-callback’] );
    }
    }

    Following is a link to the file in my Dropbox. You can download the whole file, in case you feel up to it. To find line 1404 you might be able to get there quickly by searching for “ABSPATH”. Sure appreciate your help in any case.
    https://www.dropbox.com/s/c53nb3ebimv5iog/theme.php

    Thanks, Tammo

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal Error trying to log into Dashboard’ is closed to new replies.