• Boris Adlivankin

    (@borisadlivankin)


    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 to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Lewisst

    (@tungnx89)

    Hi borisadlivankin,

    Thank you for your feedback, please try beta version LP BBpress, then feedback to us.

    Thanks.
    Best Regard!

    Thread Starter Boris Adlivankin

    (@borisadlivankin)

    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

    (@tungnx89)

    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

    (@borisadlivankin)

    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

    (@tungnx89)

    Hi borisadlivankin,

    We don’t know reason it error on your site. We try fix, you can try beta version and feedback to us.

    Thanks.

    Thread Starter Boris Adlivankin

    (@borisadlivankin)

    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)
  • You must be logged in to reply to this topic.