2.9.2 Update Fixes?

Home Forums Legacy Support Support queries Update Issues 2.9.2 Update Fixes?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #122342
    info2grow
    Spectator
    Hi 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! Lawrence
    #122347
    info2grow
    Spectator
    Getting quite a few instances of Undefined index from $_POST variables.  Could this be related to the latest WordPress update?
    #122388
    Anshuman Sahu
    Keymaster
    Thanks 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 .
    #122432
    info2grow
    Spectator
    Gremlin in func.php at line 1346 before _virtual $is_virtual = get_post_meta( $product_id, '?_virtual', true );
    #122441
    info2grow
    Spectator
    Yeah 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.
    #122476
    info2grow
    Spectator
    Found 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 enabled
    a: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.
    #122477
    info2grow
    Spectator
    Also in the process, I got rid of most of the notices will share those updates if you're interested.
    #122574
    Anshuman Sahu
    Keymaster
    Well in that case you would need to report this to Groups Plugin by itthinx 
    #122767
    info2grow
    Spectator
    Found 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!
    #122833
    Anshuman Sahu
    Keymaster
    This was overwriting the data that wplms saves in database for the quizzess .
    #124166
    info2grow
    Spectator
    UPDATE That fix didn't work for long. Was able to fix in functions.php with some help from itthinx
    add_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;
    }
    
Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘2.9.2 Update Fixes?’ is closed to new replies.