You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes an error occurs as seen below, which stops actions and hooks being fired for the course completion.
What I Expected
For an action to be triggered in a custom plugin that catches when a user has completed a course
What Happened Instead
Rarely, we get the following error in the error logs, but no errors on the frontend. No actions or hooks are fired.
stderr: WordPress database error Duplicate entry '36641-79626' for key 'PRIMARY' for query INSERT INTO wp_term_relationships (object_id, term_taxonomy_id) VALUES (36641, 79626) made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/sensei-lms/templates/single-course.php'), do_action('sensei_single_course_content_inside_before'), WP_Hook->do_action, WP_Hook->apply_filters, Sensei_Course->the_progress_statement, Sensei_Course->get_progress_statement, Sensei_Course::is_user_enrolled, Sensei_Course_Enrolment->is_enrolled, Sensei_Course_Enrolment->save_enrolment, wp_set_post_terms, wp_set_object_terms
In the last 6 months this has happened around 20 times, but it is being noticed.
This happens on multiple installs, all PHP 8 and all WP versions > 5.2
PHP / WordPress / Sensei LMS version
PHP 8.4
WP 5.5.4
Sensei LMS 4.20.0
The text was updated successfully, but these errors were encountered:
Hello @telegraphical. We currently only support WordPress 6.3 or higher and the latest version of Sensei. Could you please try upgrading your site to WordPress 6.3+ and Sensei 4.24.1 and see if the issue persists? Thanks.
Steps to Reproduce
What I Expected
For an action to be triggered in a custom plugin that catches when a user has completed a course
What Happened Instead
Rarely, we get the following error in the error logs, but no errors on the frontend. No actions or hooks are fired.
stderr: WordPress database error Duplicate entry '36641-79626' for key 'PRIMARY' for query INSERT INTO wp_term_relationships (object_id, term_taxonomy_id) VALUES (36641, 79626) made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/sensei-lms/templates/single-course.php'), do_action('sensei_single_course_content_inside_before'), WP_Hook->do_action, WP_Hook->apply_filters, Sensei_Course->the_progress_statement, Sensei_Course->get_progress_statement, Sensei_Course::is_user_enrolled, Sensei_Course_Enrolment->is_enrolled, Sensei_Course_Enrolment->save_enrolment, wp_set_post_terms, wp_set_object_terms
In the last 6 months this has happened around 20 times, but it is being noticed.
This happens on multiple installs, all PHP 8 and all WP versions > 5.2
PHP / WordPress / Sensei LMS version
PHP 8.4
WP 5.5.4
Sensei LMS 4.20.0
The text was updated successfully, but these errors were encountered: