Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load pages that render reviews #2604

Closed
4 tasks
brianhogg opened this issue Feb 22, 2024 · 0 comments
Closed
4 tasks

Cannot load pages that render reviews #2604

brianhogg opened this issue Feb 22, 2024 · 0 comments
Assignees
Labels
priority Priority by a leadership member for quick action or if unable to discuss at management meeting Status: Has PR This issue has an open pull request Type: Bug Bugs and errors

Comments

@brianhogg
Copy link
Contributor

Reproduction Steps

  1. As a student, visit the page for a course that has reviews enabled

Expected Behavior

  • Include a concise description of what you expected to happen (but didn't)

Single course page renders without error, and shows the 'Write a Review' form.

Actual Behavior

Fatal error shows for calling non-static method staticly.

Error Messages / Logs

Fatal error: Uncaught Error: Non-static method LLMS_Reviews::current_user_can_write_review() cannot be called statically in /Users/brianhogg/laravel/lifter/wp-content/plugins/lifterlms/includes/class.llms.review.php:159 Stack trace: #0 /Users/brianhogg/laravel/lifter/wp-content/plugins/lifterlms/includes/llms.template.functions.php(1190): LLMS_Reviews::output() #1 /Users/brianhogg/laravel/lifter/wp-includes/class-wp-hook.php(324): lifterlms_template_single_reviews('') #2 /Users/brianhogg/laravel/lifter/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /Users/brianhogg/laravel/lifter/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /Users/brianhogg/laravel/lifter/wp-content/plugins/lifterlms/templates/content-single-course-after.php(26): do_action('lifterlms_singl...') #5 /Users/brianhogg/laravel/lifter/wp-includes/template.php(792): require('/Users/brianhog...') #6 /Users/brianhogg/laravel/lifter/wp-content/plugins/lifterlms/includes/functions/llms-functions-content.php(56): load_template('/Users/brianhog...', false) #7 /Users/brianhogg/laravel/lifter/wp-includes/class-wp-hook.php(324): llms_get_post_content('\n<p></p>\n\n\n\n<di...') #8 /Users/brianhogg/laravel/lifter/wp-includes/plugin.php(205): WP_Hook->apply_filters('\n<p></p>\n\n\n\n<di...', Array) #9 /Users/brianhogg/laravel/lifter/wp-includes/blocks/post-content.php(48): apply_filters('the_content', '<!-- wp:paragra...') #10 /Users/brianhogg/laravel/lifter/wp-includes/class-wp-block.php(258): render_block_core_post_content(Array, '<!-- wp:paragra...', Object(WP_Block)) #11 /Users/brianhogg/laravel/lifter/wp-includes/class-wp-block.php(244): WP_Block->render() #12 /Users/brianhogg/laravel/lifter/wp-includes/blocks.php(1484): WP_Block->render() #13 /Users/brianhogg/laravel/lifter/wp-includes/blocks.php(1522): render_block(Array) #14 /Users/brianhogg/laravel/lifter/wp-includes/block-template.php(260): do_blocks('<!-- wp:templat...') #15 /Users/brianhogg/laravel/lifter/wp-includes/template-canvas.php(12): get_the_block_template_html() #16 /Users/brianhogg/laravel/lifter/wp-includes/template-loader.php(106): include('/Users/brianhog...') #17 /Users/brianhogg/laravel/lifter/wp-blog-header.php(19): require_once('/Users/brianhog...') #18 /Users/brianhogg/laravel/lifter/index.php(17): require('/Users/brianhog...') #19 /Users/brianhogg/.composer/vendor/laravel/valet/server.php(250): require('/Users/brianhog...') #20 {main} thrown in /Users/brianhogg/laravel/lifter/wp-content/plugins/lifterlms/includes/class.llms.review.php on line 159

This issue has be recreated:

  • Locally
  • On a staging site
  • On a production website
  • With only LifterLMS and a default theme
@brianhogg brianhogg added Type: Bug Bugs and errors Status: Has PR This issue has an open pull request priority Priority by a leadership member for quick action or if unable to discuss at management meeting labels Feb 22, 2024
@brianhogg brianhogg self-assigned this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority Priority by a leadership member for quick action or if unable to discuss at management meeting Status: Has PR This issue has an open pull request Type: Bug Bugs and errors
Projects
Status: Done
Development

No branches or pull requests

1 participant