• 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 4 replies - 1 through 4 (of 4 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.

    Thread Starter wrdprssguy

    (@wrdprssguy)

    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.

    I am getting this error after update:

    Uncaught Error: Call to undefined function wp_get_current_user() in /home4/vivischenk/public_html/vivischenk/wp-includes/capabilities.php:660 Stack trace: #0 /home4/vivischenk/public_html/vivischenk/wp-content/plugins/learnpress/inc/admin/lp-admin-actions.php(19): current_user_can(‘manage_options’) #1 /home4/vivischenk/public_html/vivischenk/wp-includes/class-wp-hook.php(287): _learn_press_set_user_items(Object(WP_Query)) #2 /home4/vivischenk/public_html/vivischenk/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #3 /home4/vivischenk/public_html/vivischenk/wp-includes/plugin.php(544): WP_Hook->do_action(Array) #4 /home4/vivischenk/public_html/vivischenk/wp-includes/class-wp-query.php(1768): do_action_ref_array(‘pre_get_posts’, Array) #5 /home4/vivischenk/public_html/vivischenk/wp-includes/class-wp-query.php(3432): WP_Query->get_posts() #6 /home4/vivischenk/public_html/vivischenk/wp-includes/post.php(2050): WP_Query->query(Array) #7 /home4/vivischenk/public_html/vivischenk/wp-content/plu in /home4/vivischenk/public_html/vivischenk/wp-includes/capabilities.php on line 660

    Please help! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Critical error in Learnpress courses archive’ is closed to new replies.