Automattic / sensei

Sensei LMS - Online Courses, Quizzes, & Learning
https://senseilms.com
GNU General Public License v2.0
525 stars 195 forks source link

Function sensei_get_prev_next_lessons() not found in class-sensei-frontend.php #7602

Closed jsantosi closed 14 hours ago

jsantosi commented 2 months ago

Steps to Reproduce

  1. Access the learning website
  2. Navigate to the current lesson page
  3. Try to move to the next lesson.
  4. See error

Expected Behavior I expected that clicking to move to the next lesson would transition without errors.

Actual Behavior When attempting to move to the next lesson, the following error occurs:

Fatal error: Uncaught Error: Call to undefined function sensei_get_prev_next_lessons() in /home/customer/www/../public_html/learn/wp-content/plugins/sensei-lms/includes/class-sensei-frontend.php:736 Additional Context Sensei LMS Version: 4.24.0 WordPress Version: 6.5.3

jsantosi commented 2 months ago

I managed to locate the function in template_functions.php. However, for some reason, it's not being called in class-sensei-frontend.php. Perhaps it's necessary to check if the function exists using "functions_exists". This should avoid the undefined function call error. See:

`/**

merkushin commented 1 month ago

Hi @jsantosi !

Tested it on a fresh website with WordPress 6.5.3, Sensei LMS 4.24.0 and Course Theme 1.3.7. No error found.

Do you have other plugins or do you use a custom theme? Could you try to deactivate other plugins one-by-one and check if the issue persists? If the plugin dance didn't help, try to switch the theme to a standard WordPress theme or to the Course theme and check if the issue persists.

donnapep commented 14 hours ago

Closing as no response from author.