• Resolved nuanc

    (@nuanc)


    I was updating to 4.9.1 from 4.7.5 (to the best of my ability to know since I can’t access the website.)
    This is the message I am getting now:
    Fatal error: Cannot redeclare get_paged_template() (previously declared in D:\Hosting\5671313\html\Nancy_Waldman\epiccharity\wp-includes\template.php:360) in D:\Hosting\5671313\html\Nancy_Waldman\epiccharity\wp-includes\deprecated.php on line 3783

    I have access to the files via ftp. I have cleared my browser cache. I deactivated all my plugins before updating. I read the forums and it seems that I may need to do a manual installation, but I also read (somewhere; having trouble finding it again) that I could take out the stored themes so that it will go back to the default.

    I need some direction before diving in.
    Thanks,
    Nancy

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi
    This errors says your function is already defined ; which can mean :

    you have the same function defined in two files
    or you have the same function defined in two places in the same file
    or the file in which your function is defined is included two times (so, it seems the function is defined two times)
    To help with the third point, a solution would be to use include_once instead of include when including your functions.php file — so it cannot be included more than once

    Thanks
    Ahir

    Hi
    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

    Thanks
    Ahir

    Thread Starter nuanc

    (@nuanc)

    Thank you for your input!
    I’ve looked at the two files mentioned in the error message. I did a search for “include” but nothing came up.

    The lines noted are below.
    From the template.php file:
    @return string Full path to paged template file.
    */
    function get_paged_template() {
    return get_query_template(‘paged’);
    }

    From the deprecated.php file:
    function get_paged_template() {
    _deprecated_function( __FUNCTION__, ‘4.7.0’ );

    return get_query_template( ‘paged’ );
    }

    If there is something I can do to these lines of code, let me know, please. Otherwise, I will try the theme change.

    Thanks again!
    Nancy

    Thread Starter nuanc

    (@nuanc)

    Okay, so I’m understanding now that the get_paged_template is a deprecated function and that is causing my website not to load. Is there an alternative code that I can use? What would happen if I removed that code from the template.php?

    Hi
    Can you try to install latest WordPress manually via FTP/SFTP or cpanel, because you have updated wordpress from admin side so might be some files missing or something break. So Upload core files that is wp-admin and wp-includes folder.

    Thanks
    Ahir

    Hi
    I have checked in latest version that is 4.9.1 but i can’t find get_paged_template function in template.php. so issues is file is missing or corrupted while you update wordpress. So now upload files manually that i have mentioned in previous reply.

    Thanks
    Ahir

    Thread Starter nuanc

    (@nuanc)

    Thanks for your continued help.

    I made progress today. I did a manual update, keeping the content files and the wp-config.php files and removing the outdated theme I had been using. After a few tweaks, I was able to get back into the admin for the site and all my posts, photos etc are there, but now I’m getting a 404 Page Not Found error.

    Any ideas?

    Nancy

    Thread Starter nuanc

    (@nuanc)

    Seems to be working now! I found a file that hadn’t been transferred properly.

    • This reply was modified 6 years, 10 months ago by nuanc.

    Hi

    wow, good to hear that you’re site is working fine.
    Thanks
    Ahir

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Update fail message: “Fatal error: Cannot redeclare get_paged_template()”’ is closed to new replies.