• Resolved Christian Rodríguez

    (@hanschristian)


    Hi,

    After moving some websites to a new hosting, I’m having the followin issue at the bottom of the site:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/guillemm/public_html/marquezyabogados.es/wp-includes/category-template.php on line 1145

    I deactivated all the plugins, and I’m sure isn’t having any issue with the theme (other sites transferred to this new hosting are using the same template).

    Also I re installed WordPress 4.6.1 again. But problem persists.

    What could be happening?

    Thanks for helping.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @hanschristian,
    the reason could be that your new hosting has different settings for displaying PHP errors, so maybe you already had those same errors in the previous hosting but they were not displayed.
    You should also check that your wp-config.php file does not contain the following two lines:

    
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_DISPLAY', true );
    

    Having said that, I think you have some problems in your theme, especially in the template files for articles because by having a look at your site it seems that this error is just displayed on blog articles.

    Giancarlo

    Hi,
    I also found this article:
    https://www.msgdigital.com/catchable-fatal-error-object-of-class-wp_error-could-not-be-converted-to-string/
    Maybe it can be of some help.
    Giancarlo

    Thread Starter Christian Rodríguez

    (@hanschristian)

    Ciao Giancarlo!

    I don’t have these lines on my wp-config.php (I just have set the line define('WP_DEBUG', false);).

    According the article you mentioned, it doesn’t resolve my issue, but puts me on the line about what I did wrong:

    I moved the site from Siteground to another Siteground hosting (so is using the same PHP version). But what I did is the following:

    1. Downloading the ftp and SQL file from the old hosting
    2. Inside the SQL files, I replaced the following lines:
      /home/acompany/public_html/marquezyabogados.es
      to the following: /home/guillemm/public_html/marquezyabogados.es
    3. Import this new SQL to the new Cpanel

    I just replaced the “/acompany” path to “/guillemm”. And I think this is generating some issue with the template and the database, but I cannot find exactly the error : (

    If you think you’ve some idea what’s happening, I will appreciate very much your help : )

    Grazie mile per l’aiuto!

    Chris.

    Thread Starter Christian Rodríguez

    (@hanschristian)

    Ok: the problem has “solved”.

    I did the following:

    1. Switched the theme for the parent theme
    2. Switched again to the child theme
    3. Clean Siteground’s cache

    Everything’s ok, but I found that all the widgets are misplaced, so I’ve to restore manually one by one.

    Curious things that just happens with WordPress and bad coded templates.

    Thanks anyway for helping, Giancarlo!

    Saludos : )

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Catchable fatal error on wp-includes/category-template.php’ is closed to new replies.