Multiple error in console

Home Forums Legacy Support Support queries Update Issues Multiple error in console

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #310462
    ART-Providers
    Participant
    Try marking a course complete or any other Admin activity. Takes a very long time Error on console: Failed to load resource: /wp-admin/admin-ajax.php:1 Failed to load resource: the server responded the server responded with a status of 500 ()
    Commissions screen (refresh API to test) Uncaught (in promise) SyntaxError: Unexpected end of JSON input

    at wplms_commissions.js?ver=3.9.9.4:5

    Login for the site provided
    #310513
    ART-Providers
    Participant
    This reply has been marked as private.
    #310515
    ART-Providers
    Participant
    Information in Debug log [14-Sep-2020 17:30:31 UTC] WordPress database error Unknown column 'date' in 'order clause' for query SELECT count(*) as count FROM wp_09e86fc6c9_posts as posts LEFT JOIN wp_09e86fc6c9_postmeta as meta on posts.id = meta.post_id LEFT JOIN wp_09e86fc6c9_postmeta as meta2 on posts.id = meta2.post_id WHERE meta.meta_key LIKE 'payout_1' AND meta2.meta_key LIKE 'currency_1' AND YEAR(posts.post_date_gmt) = YEAR(CURRENT_TIMESTAMP) ORDER BY date ASC LIMIT 0, 10 made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, Wplms_Commissions_API->get_instructor_payouts
    #310629
    ART-Providers
    Participant
    A screen recording: When an instructor tries to mark a course submission http://somup.com/cYQ2YpXA7D
    #311095
    Anshuman Sahu
    Keymaster
    It can be connected with buddypress : login via ftp or cpanel -> file manager . Navigate to wp-content/plugins/buddypress/bp-core/classes/class-bp-phpmailer.php file and then make this change : https://prnt.sc/uc1q2j
    #311119
    ART-Providers
    Participant
    I do not think phpmailer could be causing the issue for Instructor marking? Are you sure? We do not have the issue with HTML buddypress if you are referring to that issue
    #311135
    ART-Providers
    Participant
    You may have replied for some other query here. The problem I have reported was fixed with the following method. We are however worried that the change would be overwritten when we update the plugins from WPLMS so please implement the fix at your end. The commissions page console error for wolmscommissions.js is still present but database error is now fixed The error occurs due to an incorrect query in the function get_instructor_payouts in the file vibe-course-module/includes/api/class-api-commissions.php around line 521. $count = $wpdb->get_results( " SELECT count(*) as count FROM {$wpdb->posts} as posts LEFT JOIN {$wpdb->postmeta} as meta on posts.id = meta.post_id LEFT JOIN {$wpdb->postmeta} as meta2 on posts.id = meta2.post_id WHERE meta.meta_key LIKE 'payout_".$user_id."' AND meta2.meta_key LIKE 'currency_".$user_id."' ".$and_where." ORDER BY date ASC LIMIT ".$offset.", ".$per_page,ARRAY_A); Changing the query to the following will fix the issue $count = $wpdb->get_results( " SELECT count(*) as count FROM {$wpdb->posts} as posts LEFT JOIN {$wpdb->postmeta} as meta on posts.id = meta.post_id LEFT JOIN {$wpdb->postmeta} as meta2 on posts.id = meta2.post_id WHERE meta.meta_key LIKE 'payout_".$user_id."' AND meta2.meta_key LIKE 'currency_".$user_id."' ".$and_where." ORDER BY posts.post_date_gmt ASC LIMIT ".$offset.", ".$per_page,ARRAY_A);
    #311343
    Anshuman Sahu
    Keymaster
    Well that fix was particularly for : Try marking a course complete or any other Admin activity And yes buddypress has rolled out an update and I have checked there is no error from bp_send_email which was causing issues all over the site now . The second error. We have change the query to :
    $count = $wpdb->get_results( "
                                              SELECT count(*) as count
                                              FROM {$wpdb->posts} as posts
                                              LEFT JOIN {$wpdb->postmeta} as meta on posts.id = meta.post_id
                                              LEFT JOIN {$wpdb->postmeta} as meta2 on posts.id = meta2.post_id
                                              WHERE meta.meta_key LIKE 'payout_".$user_id."' 
                                              WHERE meta2.meta_key LIKE 'currency_".$user_id."' 
                                              ".$and_where."
                                              LIMIT ".$offset.", ".$per_page,ARRAY_A);
    removed the orderby which was causing the error as in count query there is no need of orderby . The same will be available in next udpate of vibe course module plugin .
    #311367
    ART-Providers
    Participant
    Thank you for the explanation Alex. Much appreciated. However, we still see the error on Commissions page when you login as tutor. Will this be fixed with your next update too?
    #311763
    Anshuman Sahu
    Keymaster
    yes this will be fixed in upcoming updates we have made the changes . Please remove the orderby in the query to resolve the query error .
    #311851
    ART-Providers
    Participant
    Hi Alex we have made that update but still there is error in commission.js wplms_commissions.js?ver=3.9.9.4:5 Uncaught (in promise) SyntaxError: Unexpected end of JSON input at wplms_commissions.js?ver=3.9.9.4:5 Also shows: Uncaught SyntaxError: Unexpected token '=' leading to the line 433 below window.instructor_commission_data.=[];
    #312068
    Anshuman Sahu
    Keymaster
    Well yes the error is appearing but functionality is not affected with it . You can safely ignore the error . however yes we has to fix this in next update . https://trello.com/c/LQzK7qha
Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Multiple error in console’ is closed to new replies.