Title: LearnPress bbPress integration error
Last modified: February 14, 2025

---

# LearnPress bbPress integration error

 *  Resolved [Boris Adlivankin](https://wordpress.org/support/users/borisadlivankin/)
 * (@borisadlivankin)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/learnpress-bbpress-integration-error/)
 * Hello! 
   We have fatal PHP error related with bbPress integration plugin. It appears
   with public forums accessible with everyone. And error appear when user is not
   logged in! If user will login, topics are available. We have latest version of
   LearnPress 4.2.7.7 and LearnPress – bbPress Integration Version 4.0.5.The error
   stack is:**Fatal error**: Uncaught TypeError: Argument 1 passed to LearnPress\
   Models\CourseModel::find() must be of the type int, null given, called in /var/
   sites/ledum.pro/wp-content/plugins/learnpress-bbpress/inc/load.php on line 304
   and defined in /var/sites/ledum.pro/wp-content/plugins/learnpress/inc/Models/
   CourseModel.php:1184 Stack trace: #0 /var/sites/ledum.pro/wp-content/plugins/
   learnpress-bbpress/inc/load.php(304): LearnPress\Models\CourseModel::find() #
   1 /var/sites/ledum.pro/wp-content/plugins/learnpress-bbpress/inc/load.php(290):
   LP_Addon_bbPress->_restrict_access() #2 /var/sites/ledum.pro/wp-content/plugins/
   learnpress-bbpress/inc/load.php(370): LP_Addon_bbPress->can_access_forum() #3/
   var/sites/ledum.pro/wp-includes/class-wp-hook.php(324): LP_Addon_bbPress->before_single()#
   4 /var/sites/ledum.pro/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()#
   5 /var/sites/ledum.pro/wp-includes/plugin.php(517): WP_Hook->do_action() #6 /
   var/sites/ledum.pro/wp-content/plugins/bbpress/templates/default/bbpress/content-
   single-for in **/var/sites/ledum.pro/wp-content/plugins/learnpress/inc/Models/
   CourseModel.php** on line **1184**Thank you!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Flearnpress-bbpress-integration-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Contributor [Lewisst](https://wordpress.org/support/users/tungnx89/)
 * (@tungnx89)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/learnpress-bbpress-integration-error/#post-18305533)
 * Hi borisadlivankin,
   Thank you for your feedback, please try [beta version LP BBpress](https://drive.google.com/file/d/1F6SrCOmDXL47H96CV25ZUqmBRke7JiDu/view?usp=sharing),
   then feedback to us.Thanks.Best Regard!
 *  Thread Starter [Boris Adlivankin](https://wordpress.org/support/users/borisadlivankin/)
 * (@borisadlivankin)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/learnpress-bbpress-integration-error/#post-18305589)
 * Hi Lewisst,
   The error is fixed now, but wrong message is appears. For Forums 
   that not associated to the course, which open for everyone. Text “You have to
   enroll the respective course!” is displayed, if topic is associated with course,
   this text has additional line “Go back to <associated course name with link>”.
   In first cause (if this is common topic for everyone), topic must be displayed.
   Authentication limitation must be managed by bbPress module. If topic is associated
   with course, current message is correct.
 *  Plugin Contributor [Lewisst](https://wordpress.org/support/users/tungnx89/)
 * (@tungnx89)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/learnpress-bbpress-integration-error/#post-18305711)
 * Hi borisadlivankin,
   Yes, Did you enable “Restrict User” on course, if enable 
   it will show that message, if user haven’t enroll course.Thanks.
 *  Thread Starter [Boris Adlivankin](https://wordpress.org/support/users/borisadlivankin/)
 * (@borisadlivankin)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/learnpress-bbpress-integration-error/#post-18305785)
 * Hi Lewisst,
   The problem is – this forums is not defined to any course. I have
   fixed this problem when disable Restrict User option in Forum tab on all courses.
   I have asked to content author – she was agree this. But, this is not correct
   behaviour. Now all forums is open for everyone, even they didn’t purchase any
   course.
 *  Plugin Contributor [Lewisst](https://wordpress.org/support/users/tungnx89/)
 * (@tungnx89)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/learnpress-bbpress-integration-error/#post-18305919)
 * Hi borisadlivankin,
   We don’t know reason it error on your site. We try fix, you
   can try [beta version](https://drive.google.com/file/d/14d5CaA6B_CkrWwivTHNBlu7rDvLSCH7p/view?usp=sharing)
   and feedback to us.Thanks.
 *  Thread Starter [Boris Adlivankin](https://wordpress.org/support/users/borisadlivankin/)
 * (@borisadlivankin)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/learnpress-bbpress-integration-error/#post-18306103)
 * Hi! 
   It show You have to enroll Hello, World! to view this forum!Message to any
   forum associated to the course for any user (authenticated or not) even this 
   user already enroll this course. Only admins can see the forum. Restrict user
   option has no effect. Forums not associated with coerces now working properly.
   I have roll back to beta 1.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘LearnPress bbPress integration error’ is closed to new replies.

 * ![](https://ps.w.org/learnpress/assets/icon-256x256.gif?rev=3254420)
 * [LearnPress - WordPress LMS Plugin for Create and Sell Online Courses](https://wordpress.org/plugins/learnpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/learnpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/learnpress/)
 * [Active Topics](https://wordpress.org/support/plugin/learnpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/learnpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/learnpress/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Boris Adlivankin](https://wordpress.org/support/users/borisadlivankin/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/learnpress-bbpress-integration-error/#post-18306103)
 * Status: resolved