Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1060579

    This issue was resolved with a hack, however it’s back: The “LifterLMS” plugin works with every other theme except Enfold

    Here is a reply from Developers, I did all they asked yet there was no solution found.

    Please do let me know if access is needed

    —–From Dev ————–

    Hi there,

    I checked this and for some reason the javascript file that powers the quizzes is not loaded on the site at all. I’m not sure why that is unless something’s deliberately dequeued the quiz js since there are no 404s that I can see. The file is also present where it is expected: https://ver2.wpatrainingdev.com/wp-content/plugins/lifterlms/assets/js/llms-quiz.min.js

    Without this script, the quiz button does nothing except reload the page which is what you’re experiencing right now.

    Could you or your developer check if there’s something on the site that could be causing this? It could be one of the plugins that’s not configured correctly. You could use a plugin like this one to find the culprit: https://wordpress.org/plugins/plugin-detective/

    If there’s something that’s obviously different between this site and the main one, that would be the place to start.

    I hope this helps. Do let me know if you need more information or help with this.

    Best

    #1061674

    Hey vidordesigns,

    Enfold does not block other plugins scripts. Have you tried the plugin suggested above and what are your findings?

    Best regards,
    Victoria

    #1061710

    Hi Victoria, thank you for the response. I have tried a bunch of things. We have 3 staging sites [Prod, Dev, and Ver2] The environment I instaled Enfold is Ver2 –

    The Enfold theme is the only theme where these particular scripts do not load..I have tested with many other themes. They all work fine. see image below.

    https://vidordesigns.imgur.com/all

    Through all my meanderings, I found that these two scripts are not being queued in Enfold, So I had to add manually in the footer. However that is very bad to do as we know.

    <!– added LIFTERLMS QUIZ javascript manually –>

    <!– <script src=”https://wpatrainingdev.com/wp-content/plugins/lifterlms/assets/js/llms-quiz.min.js?ver=3.24.3&#8243; type=”text/javascript”></script>
    <script src=”https://wpatrainingdev.com/wp-content/plugins/lifterlms-advanced-quizzes/assets/js/llms-aq.js?ver=1.0.4&#8243; type=”text/javascript”></script> –>

    Again – Any other theme, will work fine.

    Thank you!

    #1062302

    Hi vidordesigns,

    You can use the wp_enqueue_script function to enqueue the missing scripts, it will be a cleaner solution

    Here is a snippet used for the other script but can be adjusted
    https://gist.github.com/johnbuck/6277503

    Best regards,
    Victoria

    #1062855

    I appreciate that Victoria, My Question is..Why don’tt the scripts load in the Enfold theme, but load in any other theme?

    All other themes

    View post on imgur.com

    View post on imgur.com

    View post on imgur.com

    Enfold

    Start-quiz-does not work..no error in console

    Also where is the wp_enqueue_script?
    – I don’t see it anywhere in Functions.php

    #1063432

    Here is another image using Query Monitor. Notice the 2 scripts are not being called.

    I am puzzled that any other theme works but Enfold.

    View post on imgur.com

    #1065337

    Hi,

    I appreciate that Victoria, My Question is..Why don’tt the scripts load in the Enfold theme, but load in any other theme?

    It is possible that the scripts’ dependencies are being conditionally loaded by the theme. The theme has this feature where it only loads scripts that are actually used in the page, so one of those dependencies may be missing. Please ask the plugin author which dependencies are missing when they check your page. For now, you can use the wp_enqueue script or just leave the scripts in the footer, but we do recommend doing the former.

    Best regards,
    Ismael

    #1065607

    Ismael thanks for jumping back on, I appreciate it man. I think I got it. I REALLY want to know why this happened in detail. Is there a reason why Posts don’t load certain scripts?

    Here is what I have – Does it look good to you? The first JS is not loading; Thanks again!

    // Manually load LifterLMS quiz javascript
    add_action(‘wp_enqueue_scripts’, ‘enqueue_lifter_Quiz_Manually’);
    function enqueue_lifter_Quiz_Manually() {
    wp_enqueue_script(
    ‘lifterQuizManually’,
    plugin_dir_url(‘lifter’).’/lifterlms/assets/js/llms-quiz.js?ver=3.28.1′
    );
    wp_enqueue_script(
    ‘lifterQuizManually’,
    plugin_dir_url(‘lifter’).’/lifterlms-advanced-quizzes/assets/js/llms-aq.js?ver=1.0.9′
    );
    }

    #1065933

    Hi,

    According to the Query Monitor results seen on your screenshots, the scripts have missing dependencies so they’re not being loaded properly. Again, the theme loads certain scripts conditionally, so it’s possible that one of those scripts is a dependency, which is not present because it doesn’t meet certain conditions required by the theme.

    Yes, that snippet looks good and valid.

    Best regards,
    Ismael

    #1066172

    Thanks! Please close ticket. I do think it will come up again. What would be the bet way to reopen a case?

    #1066212

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Latest Enfold [5.+] not installing Javascript for LifterLMS plugin’ is closed to new replies.