• Resolved maarcoswesleey

    (@maarcoswesleey)


    When I use the Tutor LMS plugin settings, it gives me a critical error when accessing the plugin’s courses screen and also puts my site under maintenance.

    I am unable to use the plugin, below are the current settings for my site.

    PHP 8.1.27
    WordPress: 6.6.1
    Theme: Aardvark 4.44.1.1
    Language: Brazilian Portuguese
    Tutor LMS: 2.7.3

Viewing 15 replies - 1 through 15 (of 20 total)
  • Hi @maarcoswesleey

    I’m sorry to hear you’re experiencing issues with Tutor LMS.

    You may restart your development server to solve the issue. If the problem still occurs please provide me the screenshot so that I can understand more and give you further assistance.

    Best Regards
    Dip Saha

    Thread Starter maarcoswesleey

    (@maarcoswesleey)

    Done as requested, and the problem persists. Even with all plugins disabled, I face the same problem.

    Hi

    Can I get the screenshot of your problem?

    Thank You.

    Thread Starter maarcoswesleey

    (@maarcoswesleey)

    I’m unable to attach prints to this topic.

    Here’s a link to a folder on the drive.

    https://drive.google.com/drive/folders/14jS01chtTlpP_Mftl7m3H7nVfrX1a_sj?usp=sharing

    Thread Starter maarcoswesleey

    (@maarcoswesleey)

    error received in email.

    Um erro do tipo E_ERROR foi causado na linha 38 do arquivo /home/u769454855/domains/aneti.org.br/public_html/wp-content/plugins/tutor/views/pages/course-list.php. Mensagem de erro: Uncaught TypeError: Unsupported operand types: string * int in /home/u769454855/domains/aneti.org.br/public_html/wp-content/plugins/tutor/views/pages/course-list.php:38
    Stack trace:
    #0 /home/u769454855/domains/aneti.org.br/public_html/wp-content/plugins/tutor/classes/Admin.php(554): include()
    #1 /home/u769454855/domains/aneti.org.br/public_html/wp-includes/class-wp-hook.php(324): TUTOR\Admin->tutor_course_list()
    #2 /home/u769454855/domains/aneti.org.br/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #3 /home/u769454855/domains/aneti.org.br/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 /home/u769454855/domains/aneti.org.br/public_html/wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

    Thread Starter maarcoswesleey

    (@maarcoswesleey)

    I removed line 39 from this file and it works, I can view the courses. However, I came across another problem: when I save the settings, they do not take effect.

    I click save, and the settings are saved successfully, but when I return to the configuration page, the default settings are set.

    Hi

    Do not remove the line. Rather replace the 37 number line with this:

    $limit = intval(tutor_utils()->get_option( 'pagination_per_page' ));

    Let me know if the problem still exists.

    Best Regards
    Dip Saha

    Thread Starter maarcoswesleey

    (@maarcoswesleey)

    https://drive.google.com/file/d/1wbreiFMSfCH4-iUgXHmeFe38bBRwpee6/view?usp=sharing

    Changing the line did indeed solve the problem with the course listing.

    However, now I have a problem saving the settings. It won’t save any settings. I’ve already changed the theme and disabled all plugins, but the error persists. See the attached video.

    Hello @maarcoswesleey

    Thank you for providing the video for our assistance. It appears there might be an issue on the backend. Could you please “Inspect” the page when you click the “Save Changes” button and provide a screenshot of the “Network” tab? This will help us identify any errors. It will look like: https://snipboard.io/JUo0pT.jpg

    In the meantime, I recommend trying two things:

    1. Re-activate the plugin and check if the issue is resolved.
    2. Clear your browser cache and try the process again.

    Thank you.

    Best regards,
    Dip Saha

    Thread Starter maarcoswesleey

    (@maarcoswesleey)

    Here is the link to the video.

    I have already cleared the cache, uninstalled and installed the plugin again and the error persists. As you can see, when activating the plugin after changing the settings, the site only remains in maintenance mode.

    https://drive.google.com/file/d/12IS6XEygYCuFXRDVPRypMaZvBckQKd6p/view?usp=sharing

    Thread Starter maarcoswesleey

    (@maarcoswesleey)

    Here is a link to another more complete video with activation and deactivation of the plugin

    https://drive.google.com/file/d/1DMgNHmT-pUtQGD63X-8gl8n5jivrQkDw/view?usp=sharing

    Hi

    I am very sorry to know that you are still encountering the problem. I will suggest go to your active theme’s function.php file and paste the code below last line of the file:

    $instructor_role = tutor()->instructor_role;
    remove_role($instructor_role);
    add_role( $instructor_role, __('Tutor Instructor', 'tutor'), array() );

    $custom_post_type_permission = array(
    //Manage Instructor
    'manage_tutor_instructor',
    //Tutor Posts Type Permission
    'edit_tutor_course',
    'read_tutor_course',
    'delete_tutor_course',
    'delete_tutor_courses',
    'edit_tutor_courses',
    'edit_others_tutor_courses',
    'read_private_tutor_courses',
    'edit_tutor_courses',
    'edit_tutor_lesson',
    'read_tutor_lesson',
    'delete_tutor_lesson',
    'delete_tutor_lessons',
    'edit_tutor_lessons',
    'edit_others_tutor_lessons',
    'read_private_tutor_lessons',
    'edit_tutor_lessons',
    'publish_tutor_lessons',
    'edit_tutor_quiz',
    'read_tutor_quiz',
    'delete_tutor_quiz',
    'delete_tutor_quizzes',
    'edit_tutor_quizzes',
    'edit_others_tutor_quizzes',
    'read_private_tutor_quizzes',
    'edit_tutor_quizzes',
    'publish_tutor_quizzes',
    'edit_tutor_question',
    'read_tutor_question',
    'delete_tutor_question',
    'delete_tutor_questions',
    'edit_tutor_questions',
    'edit_others_tutor_questions',
    'publish_tutor_questions',
    'read_private_tutor_questions',
    'edit_tutor_questions',
    );
    $administrator = get_role( 'administrator' );
    if ( $administrator ) {
    $administrator_cap = array (
    'manage_tutor',
    );
    $administrator_cap = array_merge($administrator_cap, $custom_post_type_permission);
    $administrator_cap[] = 'publish_tutor_courses';
    foreach ($administrator_cap as $cap){
    $administrator->add_cap( $cap );
    }
    }

    If you are still facing problem, feel free to share your problem. Thank you for your patience.

    Best Regards
    Dip Saha

    Thread Starter maarcoswesleey

    (@maarcoswesleey)

    When adding, the error below was displayed

    Um erro do tipo E_ERROR foi causado na linha 846 do arquivo /home/u769454855/domains/aneti.org.br/public_html/wp-content/themes/aardvark/functions.php. Mensagem de erro: Uncaught Error: Call to undefined function tutor() in /home/u769454855/domains/aneti.org.br/public_html/wp-content/themes/aardvark/functions.php:846
    Stack trace:
    #0 /home/u769454855/domains/aneti.org.br/public_html/wp-settings.php(668): include()
    #1 /home/u769454855/domains/aneti.org.br/public_html/wp-config.php(102): require_once(‘/home/u76945485…’)
    #2 /home/u769454855/domains/aneti.org.br/public_html/wp-load.php(50): require_once(‘/home/u76945485…’)
    #3 /home/u769454855/domains/aneti.org.br/public_html/wp-admin/admin-ajax.php(22): require_once(‘/home/u76945485…’)
    #4 {main}
    thrown

    Hi

    Can you share your full code of function.php with me?

    Thank You.

    Thread Starter maarcoswesleey

    (@maarcoswesleey)

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘critical error when accessing the plugin’s courses scree’ is closed to new replies.