Title: joncampbell's Replies | WordPress.org

---

# joncampbell

  [  ](https://wordpress.org/support/users/joncampbell/)

 *   [Profile](https://wordpress.org/support/users/joncampbell/)
 *   [Topics Started](https://wordpress.org/support/users/joncampbell/topics/)
 *   [Replies Created](https://wordpress.org/support/users/joncampbell/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/joncampbell/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/joncampbell/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/joncampbell/engagements/)
 *   [Favorites](https://wordpress.org/support/users/joncampbell/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/joncampbell/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/joncampbell/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Sensei LMS - Online Courses, Quizzes, & Learning] Fatal error ($array) cannot be empty in /class-sensei-lesson.php:383](https://wordpress.org/support/topic/fatal-error-array-cannot-be-empty-in-class-sensei-lesson-php383/)
 *  [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-array-cannot-be-empty-in-class-sensei-lesson-php383/#post-18246256)
 * [@dericleeyy](https://wordpress.org/support/users/dericleeyy/) 
   I installed Twenty
   Twenty-Five and Health Check and did the troubleshooting.I then went to the Students
   area of the admin and Reset Progress on a user and it causes a fatal error still:[
   15-Jan-2025 20:03:18 UTC] PHP Fatal error: Uncaught ValueError: array_rand():
   Argument #1 ($array) cannot be empty in /wp-content/plugins/woothemes-sensei/
   plugins/sensei-lms/includes/class-sensei-lesson.php:3832Stack trace: 0 /wp-content/
   plugins/woothemes-sensei/plugins/sensei-lms/includes/class-sensei-lesson.php(
   3832): array_rand(Array, 0) 1 /wp-content/plugins/woothemes-sensei/plugins/sensei-
   lms/includes/class-sensei-utils.php(733): Sensei_Lesson->lesson_quiz_questions(‘
   10055172’) 2 /wp-content/plugins/woothemes-sensei/plugins/sensei-lms/includes/
   class-sensei-utils.php(811): Sensei_Utils::sensei_get_quiz_questions(10055172)
   3 /wp-content/plugins/woothemes-sensei/plugins/sensei-lms/includes/class-sensei-
   utils.php(660): Sensei_Utils::sensei_delete_quiz_answers(10055172, 3405) 4 /wp-
   content/plugins/woothemes-sensei/plugins/sensei-lms/includes/class-sensei-utils.
   php(706): Sensei_Utils::sensei_remove_user_from_lesson(10055171, 3405, true) 
   5 /wp-content/plugins/woothemes-sensei/plugins/sensei-lms/includes/class-sensei-
   utils.php(2818): Sensei_Utils::sensei_remove_user_from_course(85579, 3405) 6 /
   wp-content/plugins/woothemes-sensei/plugins/sensei-lms/includes/rest-api/class-
   sensei-rest-api-course-progress-controller.php(81): Sensei_Utils::reset_course_for_user(
   85579, 3405) 7 /wp-includes/rest-api/class-wp-rest-server.php(1292): Sensei_REST_API_Course_Progress_Controller-
   >batch_delete_items(Object(WP_REST_Request)) 8 /wp-includes/rest-api/class-wp-
   rest-server.php(1125): WP_REST_Server->respond_to_request(Object(WP_REST_Request),‘/
   sensei-interna…’, Array, NULL) 9 /wp-includes/rest-api/class-wp-rest-server.php(
   439): WP_REST_Server->dispatch(Object(WP_REST_Request)) 10 /wp-includes/rest-
   api.php(449): WP_REST_Server->serve_request(‘/sensei-interna…’) 11 /wp-includes/
   class-wp-hook.php(324): rest_api_loaded(Object(WP)) 12 /wp-includes/class-wp-
   hook.php(348): WP_Hook->apply_filters(”, Array) 13 /wp-includes/plugin.php(565):
   WP_Hook->do_action(Array) 14 /wp-includes/class-wp.php(418): do_action_ref_array(‘
   parse_request’, Array) 15 /wp-includes/class-wp.php(813): WP->parse_request(”)
   16 /wp-includes/functions.php(1336): WP->main(”) 17 /wp-blog-header.php(16): 
   wp() 18 /index.php(17): require(‘/Users/jon…..’) 19 {main}
 * thrown in /wp-content/plugins/woothemes-sensei/plugins/sensei-lms/includes/class-
   sensei-lesson.php on line 3832
    -  This reply was modified 1 year, 3 months ago by [joncampbell](https://wordpress.org/support/users/joncampbell/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Sensei LMS - Online Courses, Quizzes, & Learning] Fatal error ($array) cannot be empty in /class-sensei-lesson.php:383](https://wordpress.org/support/topic/fatal-error-array-cannot-be-empty-in-class-sensei-lesson-php383/)
 *  [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/fatal-error-array-cannot-be-empty-in-class-sensei-lesson-php383/#post-18233249)
 * On our site when we remove a user from a course, here is the relevant stack trace:
 * class-sensei-lesson.php(3832): array_rand(Array, 0)
   class-sensei-utils.php(733):
   Sensei_Lesson->lesson_quiz_questions(‘10055172’)class-sensei-utils.php(811): 
   Sensei_Utils::sensei_get_quiz_questions(10055172)class-sensei-utils.php(660):
   Sensei_Utils::sensei_delete_quiz_answers(10055172, 3405)class-sensei-utils.php(
   706): Sensei_Utils::sensei_remove_user_from_lesson(10055171, 3405, true)class-
   sensei-utils.php(2818): Sensei_Utils::sensei_remove_user_from_course(85579, 3405)
   Seems like to remove the user from the course it wants to delete their quiz answers
   but to do that it gets the lesson_quiz_questions but in our case the $questions_array
   used in this code is empty:
 * $selected_questions = _array\_rand_(
   $questions_array,$show_questions > $questions_count?
   $questions_count : $show_questions);And it errors out because it can’t randomize
   an empty array.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Product Tabs for WooCommerce] Automatic jumping to first tab](https://wordpress.org/support/topic/automatic-jumping-to-first-tab/)
 *  Thread Starter [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/automatic-jumping-to-first-tab/#post-17376811)
 * [@trose1189](https://wordpress.org/support/users/trose1189/),
   no, we have just
   stuck to the older version of Woo for now.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Product Tabs for WooCommerce] Automatic jumping to first tab](https://wordpress.org/support/topic/automatic-jumping-to-first-tab/)
 *  Thread Starter [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/automatic-jumping-to-first-tab/#post-17306165)
 * To add some more context, in WooCommerce 8.2.2 this was not a problem, it is 
   only since WooCommerce 8.3.x.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Checkout Field Manager (Checkout Manager) for WooCommerce] Conflict with Teams for WooCommerce Memberships](https://wordpress.org/support/topic/conflict-with-teams-for-woocommerce-memberships/)
 *  [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/conflict-with-teams-for-woocommerce-memberships/#post-15397662)
 * [@erostad](https://wordpress.org/support/users/erostad/)
 * A few years ago they changed the plugin so that the VALUE of select fields is
   set to the LABEL of the select fields. This will break the role field that is
   outputted by teams because the plugin filters those fields.
 * This change doesn’t just affect custom fields created by their plugin, but it
   breaks other fields created by WooCommerce itself or other plugins. It’s terrible.
   You may have to manually fix the file and use your own fork of the plugin if 
   you want to have the two work nicely together.
 * Where they made the change:
    [https://plugins.trac.wordpress.org/changeset/2276797/woocommerce-checkout-manager/trunk/includes/view/frontend/class-wooccm-fields-filters.php](https://plugins.trac.wordpress.org/changeset/2276797/woocommerce-checkout-manager/trunk/includes/view/frontend/class-wooccm-fields-filters.php)
 * A few related threads:
    [https://wordpress.org/support/topic/error-in-class-wooccm-fields-filters-php/](https://wordpress.org/support/topic/error-in-class-wooccm-fields-filters-php/)
   [https://wordpress.org/support/topic/incompatibility-with-other-plugins-8/](https://wordpress.org/support/topic/incompatibility-with-other-plugins-8/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Checkout Field Manager (Checkout Manager) for WooCommerce] Your plugin broke fields for other plugins](https://wordpress.org/support/topic/your-plugin-broke-fields-for-other-plugins/)
 *  [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/your-plugin-broke-fields-for-other-plugins/#post-14872646)
 * Hey [@wppunk](https://wordpress.org/support/users/wppunk/)
    They broke this a
   year and a half ago by changing the value of <option> elements to be the text
   label instead of the value:
 * [https://plugins.trac.wordpress.org/changeset/2276797/woocommerce-checkout-manager/trunk/includes/view/frontend/class-wooccm-fields-filters.php](https://plugins.trac.wordpress.org/changeset/2276797/woocommerce-checkout-manager/trunk/includes/view/frontend/class-wooccm-fields-filters.php)
 * They don’t seem to care to fix it, even though it breaks <select> fields that
   are outside of Checkout Manager.
 * I gave up on trying to get them to fix it and changed my local copy of the plugin
   to work properly and then increased the version number so it doesn’t get updated
   to a broken version again.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Checkout Field Manager (Checkout Manager) for WooCommerce] Error in class-wooccm-fields-filters.php](https://wordpress.org/support/topic/error-in-class-wooccm-fields-filters-php/)
 *  [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/error-in-class-wooccm-fields-filters-php/#post-12999526)
 * The plugin has been updated multiple times but this very, very, clear error is
   still not fixed.
    -  This reply was modified 5 years, 10 months ago by [joncampbell](https://wordpress.org/support/users/joncampbell/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Checkout Field Manager (Checkout Manager) for WooCommerce] Incompatibility with other plugins](https://wordpress.org/support/topic/incompatibility-with-other-plugins-8/)
 *  [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/incompatibility-with-other-plugins-8/#post-12861917)
 * Likely related to this thread as well: [https://wordpress.org/support/topic/error-in-class-wooccm-fields-filters-php/](https://wordpress.org/support/topic/error-in-class-wooccm-fields-filters-php/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Checkout Field Manager (Checkout Manager) for WooCommerce] Error in class-wooccm-fields-filters.php](https://wordpress.org/support/topic/error-in-class-wooccm-fields-filters-php/)
 *  [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-in-class-wooccm-fields-filters-php/#post-12861910)
 * Agreed, and for the sake of stability, maybe this plugin should not be messing
   with default WooCommerce field handling and only should apply to fields it generates.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Dealing with HTML Entities](https://wordpress.org/support/topic/dealing-with-html-entities/)
 *  Thread Starter [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/dealing-with-html-entities/#post-12274463)
 * [@richaber](https://wordpress.org/support/users/richaber/) It looks like the 
   post titles is something we can fix in our content.
    But the categories it seems
   like WordPress saves those to the database with the full html entity, instead
   of just the ampersand.
 * Maybe that is something that could be fixed in the plugin for everyone.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Dealing with HTML Entities](https://wordpress.org/support/topic/dealing-with-html-entities/)
 *  Thread Starter [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/dealing-with-html-entities/#post-12237201)
 * Cool cool cool.
    My titles and terms have the html entities stored in the WordPress
   database. I’ll just go have a good cry and then ask my client why we are doing
   that.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Dealing with HTML Entities](https://wordpress.org/support/topic/dealing-with-html-entities/)
 *  Thread Starter [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/dealing-with-html-entities/#post-12236065)
 * Even using the default instantsearch.php template it does it.
    So post_title 
   looks like this: {{{ data._highlightResult.post_title.value }}} and {{ data.post_title}}
   where it is used.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Send Emails with Mandrill] Plugin causing 404 errors](https://wordpress.org/support/topic/plugin-causing-404-errors-2/)
 *  [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/plugin-causing-404-errors-2/#post-11003675)
 * [@cornel](https://wordpress.org/support/users/cornel/),
    Any chance you can send
   me the fixed files?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Order Export for WooCommerce] Plugin doesn’t work anymore with Enfold theme](https://wordpress.org/support/topic/plugin-doesnt-work-anymore-with-enfold-theme/)
 *  [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-anymore-with-enfold-theme/#post-10861405)
 * I think it’s related to lines 9-11 in /order-export-and-more-for-woocommerce/
   js/main.js
 * Jquery is bugging out in the admin because of that event handler for clicks on.
   asd
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Autoptimize] Can’t exclude css file](https://wordpress.org/support/topic/cant-exclude-css-file/)
 *  Thread Starter [joncampbell](https://wordpress.org/support/users/joncampbell/)
 * (@joncampbell)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/cant-exclude-css-file/#post-9772201)
 * I think I know what the problem is. The css is imported into style.css
    Style.
   css in the theme actually imports 7 other css files.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/joncampbell/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/joncampbell/replies/page/2/?output_format=md)