Error Message in Log

  • nadia
    nadia
    Newbie 20 points
    May 18, 2020 at 11:55 pm

    Hi

    1. I recently upgraded my PHP to 7.3 and now receiving this error message it appears it has something to do with directory template,

    2. I am also receiving this message after we submit a add listing
    There has been a critical error on your website.

    Learn more about debugging in WordPress.

  • JamesD
    JamesD
    Super Guru 1,722 points
    May 19, 2020 at 3:25 am

    Hello,

    I’d recommend turning on WP_DEBUG/WP_DEBUG_LOG in your wp-config.php file.

    To turn on WP debugging, open the wp-config.php file and look for define(‘WP_DEBUG’, false);.
    If you have it there already, then make sure it’s set to true.

    If it’s not in the file then

    add define('WP_DEBUG', true);
    add define('WP_DEBUG_LOG', true);

    right above the /* That’s all, stop editing! Happy blogging. */ line.

    Once you’re done with that go through the motions that cause the error. The page should tell you exactly where any problems are. This will also create a log file located /wp-content/debug.log. The same error info from the page will also be stored in the log file.

    Once you’ve have the info you need you can turn those settings OFF or remove them altogether.

  • nadia
    nadia
    Newbie 20 points
    May 19, 2020 at 5:11 am

    Hi
    Thanks

    Here are some of the error. It has something to do with the directory template, is this something that support can help with

    PHP Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in /home/o4mf6e61scvu/public_html/wp-content/themes/DT/framework/class/class_shortcodes.php on line 2554

    HP Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in /home/o4mf6e61scvu/public_html/wp-content/themes/DT/framework/class/class_shortcodes.php on line 2554

    PHP Warning: Cannot modify header information – headers already sent by (output started at /home/o4mf6e61scvu/public_html/wp-content/themes/DT/framework/class/class_objects.php:1743) in /home/o4mf6e61scvu/public_html/wp-content/themes/DT/framework/class/class_layout.php on line 433

    Cannot modify header information – headers already sent by (output started at /home/o4mf6e61scvu/public_html/wp-content/themes/DT/framework/class/class_objects.php:1743) in /home/o4mf6e61scvu/public_html/wp-includes/pluggable.php on line 1281

  • nadia
    nadia
    Newbie 20 points
    May 19, 2020 at 5:19 am

    This is the error message when I tried to submit the listing

    PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/o4mf6e61scvu/public_html/wp-content/themes/DT/framework/class/class_core.php on line 4263

    PHP Fatal error: Uncaught Error: [] operator not supported for strings in /home/o4mf6e61scvu/public_html/wp-content/themes/DT/framework/class/class_core.php:4267

    Stack trace:
    #0 /home/o4mf6e61scvu/public_html/wp-content/themes/DT/framework/class/class_layout.php(499): white_label_themes->RECENTLYVIEWED(4347, 111)
    #1 /home/o4mf6e61scvu/public_html/wp-includes/class-wp-hook.php(289): core_layout->handle_post_type_template(‘/home/o4mf6e61s…’)
    #2 /home/o4mf6e61scvu/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(‘/home/o4mf6e61s…’, Array)
    #3 /home/o4mf6e61scvu/public_html/wp-includes/template.php(63): apply_filters(‘single_template’, ‘/home/o4mf6e61s…’, ‘single’, Array)
    #4 /home/o4mf6e61scvu/public_html/wp-includes/template.php(527): get_query_template(‘single’, Array)
    #5 /home/o4mf6e61scvu/public_html/wp-includes/template-loader.php(81): get_single_template()
    #6 /home/o4mf6e61scvu/public_html/wp-blog-header.php(19): require_once(‘/home/o4mf6e61s…’)
    #7 /home/o4mf6e61scvu/public_html/index.php(17): require( in /home/o4mf6e61scvu/public_html/wp-content/themes/DT/framework/class/class_core.php on line 4267

  • JamesD
    JamesD
    Super Guru 1,722 points
    May 19, 2020 at 5:47 am

    Try this…

    • Make a backup of the /DT/framework/class/class_core.php file.
    • Extract the attached file.
    • Upload the class_core.php file to replace the file you just made a backup of.

    Try adding a listing and see if you’re still receiving the critical error.
    If not, then replace the file with your original backup.
    Note: I’ve added an original as a backup as well, just not sure if you’re using the v8.8.7 files. I’ve also placed a // Fixed comment next to each line that was changed.

    Attachments:
    You must be logged in to view attached files.
  • nadia
    nadia
    Newbie 20 points
    May 20, 2020 at 4:18 am

    Thanks James D. It worked.

  • JamesD
    JamesD
    Super Guru 1,722 points
    May 20, 2020 at 4:19 am

    Good to hear, you’re welcome.

  • Marie
    Marie
    Super Guru 1,857 points
    May 22, 2020 at 3:46 am

    Thanks for sharing 🙂

Viewing 8 posts - 1 through 8 (of 8 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes