• I’m having trouble with loading a LearnPress quiz, the content is showing as blank.

    Here’s the errors that are showing in Dev console:

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter billpeet

    (@billpeet)

    Can’t seem to attach screenshots, here’s the text of the errors:

    Uncaught ReferenceError: lpGlobalSettings is not defined
    at itemsProgress (single-curriculum.js?ver=1742945369:315:19)
    at HTMLDocument. (single-curriculum.js?ver=1742945369:593:76)

    Uncaught ReferenceError: lpQuizSettings is not defined
    at Module.init (quiz.js?ver=1742945369:3554:3)
    at week-1/:1117:14
    at Object.doHook (utils.js?ver=1742945369:304:26)
    at Object.doAction (utils.js?ver=1742945369:262:17)
    at HTMLDocument. (single-curriculum.js?ver=1742945369:1203:11)

    Plugin Support brianvu-tp

    (@briantp)

    Hi billpeet,

    Thank you for contacting us.

    Unfortunately, the website you provided is currently inaccessible. To help us accurately diagnose and resolve the quiz loading issue, could you please provide a screen recording or screenshots of the error you’re encountering?

    In the meantime, you can try temporarily disabling any caching plugins on your site. Caching plugins can sometimes interfere with LearnPress functionality and cause unexpected behavior.

    Best regards,
    Brianvu-tp

    Thread Starter billpeet

    (@billpeet)

    Thanks Brianvu-tp,

    I have a temporary fix to the problem – wp-content/learnpress/inc/abstracts/abstract-assets.php, line 63, replaced:

    <span style=”font-family: "CaskaydiaCove NF", Consolas, "Courier New", monospace, Consolas, "Courier New", monospace; font-size: 14px; text-wrap-mode: nowrap; color: rgb(239, 176, 128);”>add_action( ‘wp_print_scripts’, array( $this, ‘load_scripts’ ), $priority );</span>

    with:

    add_action( ‘wp_enqueue_scripts’, array( $this, ‘load_scripts’ ), $priority );

    I understand wp_print_scripts is not supposed to be used anymore?

    Use wp_enqueue_scripts, not wp_print_styles, to enqueue scripts and styles for the frontend

    Plugin Support brianvu-tp

    (@briantp)

    Hi billpeet,

    Thank you for your response and for providing the code snippet.

    The code you mentioned:

    <span style=”font-family: "CaskaydiaCove NF", Consolas, "Courier New", monospace, Consolas, "Courier New", monospace; font-size: 14px; text-wrap-mode: nowrap; color: rgb(239, 176, 128);”>add_action( ‘wp_print_scripts’, array( $this, ‘load_scripts’ ), $priority );</span>

    is not a standard part of the LearnPress core and also has incorrect HTML tags within it. It suggests that your LearnPress installation might have been modified directly.

    We recommend the following steps:

    1. Backup your site: Before making any changes, create a full backup of your website.
    2. Reinstall LearnPress: Delete your current LearnPress installation and install the latest version from the WordPress repository. This will ensure you have a clean, unmodified version.
    3. Child Theme Customizations: If you have any custom code, move it to your child theme’s functions.php file or a custom plugin. Avoid modifying the LearnPress core files directly.
    4. Check for Plugin Conflicts: The errors you’re seeing (“lpGlobalSettings is not defined,” “lpQuizSettings is not defined”) often indicate JavaScript conflicts. Temporarily disable any security or caching plugins to see if the issue persists.

    By following these steps, you can rule out any core file modifications and identify potential plugin conflicts.

    Best regards,
    Brianvu-tp

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