Support » Plugin: LearnPress - WordPress LMS Plugin » Critical error in Learnpress courses archive

  • Howdy Learnpressers!

    On a Learnpress 3.2.7.2 site under WordPress 5.4.1 the courses archive page does not display correctly and I get a fatal error in the PHP log:

    PHP Fatal error: Uncaught Error: Call to a member function get_image() on bool in /data/web/e10095/html/wordpress/wp-content/plugins/learnpress/templates/loop/course/thumbnail.php:22
    Stack trace:
    #0 /data/web/e10095/html/wordpress/wp-content/plugins/learnpress/inc/lp-template-functions.php(2509): include()
    #1 /data/web/e10095/html/wordpress/wp-content/plugins/learnpress/inc/lp-template-functions.php(1356): learn_press_get_template(‘loop/course/thu…’)
    #2 /data/web/e10095/html/wordpress/wp-includes/class-wp-hook.php(287): learn_press_courses_loop_item_thumbnail(”)
    #3 /data/web/e10095/html/wordpress/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    #4 /data/web/e10095/html/wordpress/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #5 /data/web/e10095/html/wordpress/wp-content/plugins/learnpress/templates/content-course.php(37): do_action(‘learn-press/cou…’)
    #6 /data/web/e10095/html/wordpress/wp-includes/template.php(725): require(‘/data/web/e1009…’)
    #7 /data/web/e10095/html/wordpress/wp-content/p in /data/web/e10095/html/wordpress/wp-content/plugins/learnpress/templates/loop/course/thumbnail.php on line 22

    It seems that for some reason that the Learnpress code tries to access a get_image() method on a bool data type.

    Thanks for any hints!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    Please try these ways then check it again.
    – re-install the course then check it again.
    – deactivate all your plugin and use the default theme.

    Thanks for the quick reply.

    Duplicating the course and deleting the original one did not help.

    However, deactivating all plugins and re-activating them one-by-one revealed the “Polylang” plugin caused this critical PHP error in LearnPress.

    I’ll try changing some settings there, but I’m somehow at a loss on how this particular plugin possibly could interfere with LP course objects.

    Thanks again for your help!

    Plugin Author ThimPress

    (@thimpress)

    @wrdprssguy we are checking this error and will fix it in the next update. Please be patient and wait for the next version.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.