• I have been looking around but can’t find another one had similar error.

    After upgrading my wordpress/plugins… (hard to remember). my website got this error message:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/content/41/7375441/html/atherethere/wp-includes/default-constants.php on line 101

    and the line 101 is

    function wp_plugin_directory_constants() {
    if ( !defined(‘WP_CONTENT_URL’) )
    define( ‘WP_CONTENT_URL’, get_option(‘siteurl’) . ‘/wp-content’); // full url – WP_CONTENT_DIR is defined further up

    please help ?? feeling lost
    i tried deactivated the plugins from ftp … and also re-uploading the wordpress files other than the wp-content folder..
    but nothing helped.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hello, i’ve been having the same issue.

    https://themehybrid.com/board/topics/urgent-catchable-fatal-error-site-down

    This thread here pointed me in the right direction, although i’m not sure if the issue is definitely solved.

    I have the same issue (same error message, also line 101 in default-constants). The website has been completely stable for 3 years, but now this. It probably first happened on July 25th. I realised the site was down late on the 28th and managed to recover it the following morning by switching to a backup copy of the database taken by the hosting service on the 25th. It stayed up for 24 hours, but then went down again. I switched to a backup copy taken early on the 30th. This time the site stayed up for 36 hours before going down again, always with the same error message. The only thing about the site that has changed recently, as far as I know, is the WP update. Any bright ideas? Does the fact that it keeps tripping out at longish intervals provide a clue?

    Thread Starter babeuske

    (@babeuske)

    I had to pay freelance on upwork to fix it .. Costed me $23
    I couldn’t find a solution
    ;(
    Now the website is running fine

    Another crash this morning (same error message), presumably a reaction to the WP4.2.4 release on August 4th (my website takes updates automatically). I have now been able to establish that my problem is the one described in the thread mentioned by brunopbarbosa above, namely that the site URL is being reset to O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:30:”wpdb_get_table_charset_failure”;a:1:{i:0;s:0:””;}}s:10:”error_data”;a:0:{}}. Hardly surprising the site is crashing if WP updates are doing that to it…

    Here’s a possible solution: the site developer has left two lines of code at the top of the functions.php file in my themes folder that I suspect should have been removed:
    update_option(‘siteurl’,’https://www.elysiansingers.com’);
    update_option(‘home’,’https://www.elysiansingers.com’);
    I will take them out and see what happens.

    The site has survived the upgrade to WordPress 4.3, so hopefully that was the answer.

    I was facing the same problem and then i got the solution by doing the below.

    if you have migrated the site from one server to another and have edited the config.php and functions.php files with the addition of these two lines.

    define(‘WP_HOME’,’https://example.com’);
    define(‘WP_SITEURL’,’https://example.com’);

    Remove the above lines from config.php and functions.php files.

    Then go to wp-options table in your phpmyadmin from your cpanel account.
    You will find the error like this “O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:30:”wpdb_get_table_charset_failure”;a:1:{i:0;s:0:””;}}s:10:”error_data”;a:0:{}}”

    Replace the whole thinng with the correct url like https://www.example.com.

    Save changes and you are done. Hope this helps you.

    Thanks

    if you have migrated the site from one server to another and have edited the config.php and functions.php files with the addition of these two lines.

    define(‘WP_HOME’,’https://example.com’);
    define(‘WP_SITEURL’,’https://example.com’);

    Remove the above lines from config.php and functions.php files.

    Then go to wp-options table in your phpmyadmin from your cpanel account.
    You will find the error like this “O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:30:”wpdb_get_table_charset_failure”;a:1:{i:0;s:0:””;}}s:10:”error_data”;a:0:{}}”

    Replace the whole thinng with the correct url like https://www.example.com.

    Save changes and you are done. Hope this helps you.

    This was EXACTLY the solution to the problem. Thank you ishfaq6680!

    @mimi.
    I am glad that the solution helped you.

    Borge

    (@joeborge0914)

    Correct. Or easy way go to phpmyadmin

    >wp_option > siteURL

    edit it from

    “O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:30:”wpdb_get_table_charset_failure”;a:1:{i:0;s:0:””;}}s:10:”error_data”;a:0:{}}”

    into

    https://www.yourdomain.com

    crtbretagne

    (@crtbretagne)

    Hello,

    I encounter the same problem.
    Do you know the origin of the modification of the database wp_option > siteURL as “O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:30:”wpdb_get_table_charset_failure”;a:1:{i:0;s:0:””;}}s:10:”error_data”;a:0:{}}” ?

    this is caused by:
    theme ?
    plugin ?
    or other reasons ?

    thanks

    My problem is “Catchable fatal error: Object of class WP_Error could not be converted to string in /home/max/public_html/wp-includes/default-constants.php on line 248
    “, can you please give me solution.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Catchable fatal error… default-constants.php’ is closed to new replies.