• Resolved vrushalidigitcure

    (@vrushalidigitcure)


    I am using Tutor LMS plugin to add courses. Before few days there was list of courses available in Tutor LMS dashboard. But today I found the message “There has been a critical error on this website” instead of the list of courses. But on the website I can see list of courses. Please help me to solve this issue.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for reaching out.

    To diagnose the issue, please enable WordPress debugging by following these steps:

    1. Access your website via FTP or File Manager.
    2. Locate and edit the wp-config.php file.
    3. Find the line: define( 'WP_DEBUG', false );
    4. Replace it with the following:
      define( 'WP_DEBUG', true );
      define( 'WP_DEBUG_LOG', true );
      define( 'WP_DEBUG_DISPLAY', false );
      @ini_set( 'display_errors', 0 );
    5. Save the file and reload the Tutor LMS dashboard.
    6. After encountering the error, locate the debug.log file in the wp-content folder and share its contents with me.

    This will help me identify the cause of the issue and provide the best solution.

    Thread Starter vrushalidigitcure

    (@vrushalidigitcure)

    Hello,

    I debugged the issue as per the steps you provided. I got the following errors in the debug.log file:

    [06-Feb-2025 03:59:54 UTC] PHP Warning: Cannot modify header information – headers already sent in /home/u557383433/domains/alphatrend.in/public_html/wp-content/plugins/royal-elementor-addons/plugin.php on line 439
    [06-Feb-2025 03:59:54 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function custom_course_info_tab_name(), 1 passed in /home/u557383433/domains/alphatrend.in/public_html/wp-includes/class-wp-hook.php on line 324 and exactly 2 expected in /home/u557383433/domains/alphatrend.in/public_html/wp-content/themes/tutorstarter/functions.php:37
    Stack trace:
    #0 /home/u557383433/domains/alphatrend.in/public_html/wp-includes/class-wp-hook.php(324): custom_course_info_tab_name()
    #1 /home/u557383433/domains/alphatrend.in/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #2 /home/u557383433/domains/alphatrend.in/public_html/wp-content/plugins/tutor/classes/Course_List.php(189): apply_filters()
    #3 /home/u557383433/domains/alphatrend.in/public_html/wp-content/plugins/tutor/views/pages/course-list.php(47): TUTOR\Course_List->tabs_key_value()
    #4 /home/u557383433/domains/alphatrend.in/public_html/wp-content/plugins/tutor/classes/Admin.php(606): include(‘/home/u55738343…’)
    #5 /home/u557383433/domains/alphatrend.in/public_html/wp-includes/class-wp-hook.php(324): TUTOR\Admin->tutor_course_list()
    #6 /home/u557383433/domains/alphatrend.in/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #7 /home/u557383433/domains/alphatrend.in/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 /home/u557383433/domains/alphatrend.in/public_html/wp-admin/admin.php(259): do_action()
    #9 {main}
    thrown in /home/u557383433/domains/alphatrend.in/public_html/wp-content/themes/tutorstarter/functions.php on line 37
    [06-Feb-2025 04:00:00 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function custom_course_info_tab_name(), 1 passed in /home/u557383433/domains/alphatrend.in/public_html/wp-includes/class-wp-hook.php on line 324 and exactly 2 expected in /home/u557383433/domains/alphatrend.in/public_html/wp-content/themes/tutorstarter/functions.php:37
    Stack trace:
    #0 /home/u557383433/domains/alphatrend.in/public_html/wp-includes/class-wp-hook.php(324): custom_course_info_tab_name()
    #1 /home/u557383433/domains/alphatrend.in/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #2 /home/u557383433/domains/alphatrend.in/public_html/wp-content/plugins/tutor/classes/Course_List.php(189): apply_filters()
    #3 /home/u557383433/domains/alphatrend.in/public_html/wp-content/plugins/tutor/views/pages/course-list.php(47): TUTOR\Course_List->tabs_key_value()
    #4 /home/u557383433/domains/alphatrend.in/public_html/wp-content/plugins/tutor/classes/Admin.php(606): include(‘/home/u55738343…’)
    #5 /home/u557383433/domains/alphatrend.in/public_html/wp-includes/class-wp-hook.php(324): TUTOR\Admin->tutor_course_list()
    #6 /home/u557383433/domains/alphatrend.in/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #7 /home/u557383433/domains/alphatrend.in/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 /home/u557383433/domains/alphatrend.in/public_html/wp-admin/admin.php(259): do_action()
    #9 {main}
    thrown in /home/u557383433/domains/alphatrend.in/public_html/wp-content/themes/tutorstarter/functions.php on line 37

    Hello @vrushalidigitcure,

    Thank you for sharing the debug log.

    Based on the error messages, the issue is caused by a custom function named custom_course_info_tab_name() in your TutorStarter theme’s functions.php file. To resolve the issue, you need to either remove or comment out this function.

    Thread Starter vrushalidigitcure

    (@vrushalidigitcure)

    I removed that code from function.php file. But still I can’t see course list in Tutor LMS dashboard. But when I started WordPress recovery mode, I saw the course list. However, as soon as I exited recovery mode, the ‘Critical Error’ message appeared again instead of the course list.

    Thread Starter vrushalidigitcure

    (@vrushalidigitcure)

    Also, in WordPress recovery mode, I saw the course list, but on the frontend, my site was down.

    Thread Starter vrushalidigitcure

    (@vrushalidigitcure)

    Hi,

    Issue is solved. Thank you so much for your help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.