Home › Forums › Legacy Support › Support queries › Update Issues › 2.9.2 Update Fixes?
Tagged: groups, itthinx, quiz results, the_content
- This topic has 10 replies, 2 voices, and was last updated 7 years, 3 months ago by info2grow.
Viewing 11 posts - 1 through 11 (of 11 total)
-
AuthorPosts
-
July 26, 2017 at 1:04 am #122342info2growSpectatorHi there, we came across a few things in our logs after the update on a clean install that affected quiz functionality. Can you give our fixes a quick look and let us know if they are correct or if there is a way to do it better? wp-content/themes/wplms/includes/func.php line 185 - $more is declared in an if statement and accessed outside of it line 1625 - global $post; is declared in an if statement and accessed outside of it wp-content/plugins/vibe-course-module/includes/bp-course-functions.php line 699 - $post is not defined, needs global $post; at start of function wp-content/plugins/vibe-course-module/includes/bp-course-ajax.php line 2343 - do_action('wplms_submit_quiz',$quiz_id,$user_id,$answers); the function wplms_submit_quiz does not accept a 3rd arg should be do_action('wplms_submit_quiz',$quiz_id,$user_id); line 2349 - bp_course_save_question_quiz_answer($quiz_id,$question_id,$user_id,$answer); $answer is not defined, doesn't look like it's used in the function but we could declare $answer = $_POST['answer']; at the start of the function wp-content/plugins/vibe-course-module/includes/bp-course-actions.php line 1592 - global $post; is declared in an if statement and accessed outside of it Will post more as we go! Thanks! LawrenceJuly 26, 2017 at 3:28 am #122347info2growSpectatorGetting quite a few instances of Undefined index from $_POST variables. Could this be related to the latest WordPress update?July 26, 2017 at 1:44 pm #122388Anshuman SahuKeymasterThanks for reporting all of these . Will try fixing these . by the way you can safely ignore these php notices and can turn off the wp_debug off .Theme would still function normally .July 26, 2017 at 3:31 pm #122432info2growSpectatorGremlin in func.php at line 1346 before _virtual $is_virtual = get_post_meta( $product_id, '?_virtual', true );July 26, 2017 at 3:47 pm #122441info2growSpectatorYeah not super concerned about the notices other than they clutter up our error logs in WPEngine but we were having issues with the quiz saying security check failed and quiz results not showing on a fresh stock install. Works after the above is applied (last reply is re autocomplete orders). Still having a problem with blank quiz results on all our production sites. Basically, the content, marked answer, and correct answer are not being recorded bp_activity_meta. Looking into it, will post any conflicting plugins or changes if we come across any.July 27, 2017 at 12:58 am #122476info2growSpectatorFound the culprit, it's the Groups Plugin by itthinx that is interfering with the recording of quiz results. Here's the bp_activity_meta with groups disabled
a:4:{i:2319;a:7:{s:7:"content";s:54:" Big Buck Bunny is the first project by ";s:4:"type";s:6:"single";s:13:"marked_answer";s:20:" wrong answer ";s:14:"correct_answer";s:30:" the Blender Foundation ";s:12:"explaination";s:143:" The Blender Institute is a division of the foundation set up specifically to facilitate the creation of open content films and games. ";s:9:"max_marks";s:1:"5";s:5:"marks";s:1:"0";}i:2320;a:7:{s:7:"content";s:115:" The Blender Institute was set up specifically to facilitate the creation of open content films and games. ";s:4:"type";s:9:"truefalse";s:13:"marked_answer";s:5:"FALSE";s:14:"correct_answer";s:12:" TRUE ";s:12:"explaination";s:141:" The Blender Institute is a division of the foundation set up specifically to facilitate the creation of open content films and games. ";s:9:"max_marks";s:1:"5";s:5:"marks";s:1:"0";}s:10:"user_marks";i:0;s:11:"total_marks";i:10;}user_id = 2
Are here it is with Groups enableda:4:{i:2319;a:7:{s:7:"content";s:0:"";s:4:"type";s:6:"single";s:13:"marked_answer";s:0:"";s:14:"correct_answer";s:0:"";s:12:"explaination";s:0:"";s:9:"max_marks";s:1:"5";s:5:"marks";s:1:"0";}i:2320;a:7:{s:7:"content";s:0:"";s:4:"type";s:9:"truefalse";s:13:"marked_answer";s:5:"FALSE";s:14:"correct_answer";s:0:"";s:12:"explaination";s:0:"";s:9:"max_marks";s:1:"5";s:5:"marks";s:1:"0";}s:10:"user_marks";i:0;s:11:"total_marks";i:10;}user_id = 2
It used to work before but not for a few months now at least. Would welcome any advice even if it's just pointing me to the right function.July 27, 2017 at 1:00 am #122477info2growSpectatorAlso in the process, I got rid of most of the notices will share those updates if you're interested.July 27, 2017 at 2:27 pm #122574Anshuman SahuKeymasterWell in that case you would need to report this to Groups Plugin by itthinxJuly 28, 2017 at 6:12 pm #122767info2growSpectatorFound it! wp-content\plugins\groups\lib\access\class-groups-post-access.php Line 102 add_filter( 'the_content', array( __CLASS__, 'the_content' ), 1 ); Commented this out and everything works again! We were also having problems with the terms and conditions not showing on the checkout page. This fixes that as well. So far it looks like Groups still functions without this line. Any thoughts on what is wrong here would be appreciated but we understand this isn't your plugin. Hope this helps someone else!July 29, 2017 at 12:19 pm #122833Anshuman SahuKeymasterThis was overwriting the data that wplms saves in database for the quizzess .August 9, 2017 at 11:04 pm #124166info2growSpectatorUPDATE That fix didn't work for long. Was able to fix in functions.php with some help from itthinxadd_filter( 'groups_post_access_the_content_apply', 'my_groups_post_access_the_content_apply', 10, 2 ); function my_groups_post_access_the_content_apply( $apply, $output ) { global $post; global $wp; $current_url = home_url(add_query_arg(array(),$wp->request)); if (strpos($current_url, 'course-results') !== false) { $apply = false; } return $apply; }
-
AuthorPosts
Viewing 11 posts - 1 through 11 (of 11 total)
- The topic ‘2.9.2 Update Fixes?’ is closed to new replies.