comment_form() function not working

Home Forums Legacy Support Support queries Other issues comment_form() function not working

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #86083
    deeaspring
    Participant
    Hi, I seem to be having an issue with the review form in the sense that it's not showing up. My theme and plugins are all up to date. I tracked the issue down in the file course-review.php and I echoed a string before the comment_form() function call. The string is being displayed, but the comment_form does nothing. See below:
        if(is_user_logged_in() && vibe_validate($course_review) && bp_course_is_member($post->ID,$user_id)){ echo "Comment form should output here"; comment_form(array('fields'=>$fields,'comment_field'=>$comment_field,'label_submit' => __('Post Review','vibe'),'title_reply'=> '<span>'.__('Post Review','vibe').'</span>','logged_in_as'=>'','comment_notes_after'=>'' )); }
    This gives me "Comment form should output here" but no comment form. I've checked all your suggestions from the forum. Everything is set up right, comments enabled. Seems to be the same issue as here: https://wplms.io/support/forums/topic/course-review-doesnt-work/ I downloaded the theme again today. Overwrote the file, but still, same issue. Can you give me the working version of that file please so I can compare?  
    #86283
    Anshuman Sahu
    Keymaster
    Okay can you please provide your wp-admin credentials and site url to check this issue at your end  ? PS : mark reply as private while sharing credentials  .
    #86310
    deeaspring
    Participant
    This reply has been marked as private.
    #86491
    Anshuman Sahu
    Keymaster
    Okay I just checked your site and found that the settings to show review form "Post Reviews from course home page" was not enabled . Please enable this setting and check the issue again : http://prntscr.com/dmmif6
    #86525
    deeaspring
    Participant
    Odd.. I had tried switching that to on as well, but it didn't work before. It seems to be working now, thanks. Is it possible to set that to On by default using code? My client isn't very technical and probably won't know to enable that on every course.  
    #86577
    Go to wp-admin->plugins->editor->wplms customiser->open wplms-customiser.php add these lines and save the file. add_filter('wplms_course_metabox','custom_fx1234'); function custom_fxs1234($metabox_settings){ $metabox_settings['vibe_course_review']['std'] = 'S'; return $metabox_settings; }
    #87777
    deeaspring
    Participant
    Unfortunately that didn't work. It is breaking my Course settings metapanel. I also created a new course and replicated the exact same settings, yet the comment box wasn't showing. My solution was to edit course-review.php to remove all verifications for the user to be a member or to have that "Post Reviews from course home page"  setting set to On. Works for me. Can consider it closed.
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘comment_form() function not working’ is closed to new replies.