Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Sep 16, 2016 @ 15:03
    Tim
    0

    Query Not Loaded Error

    I have a site where we load in JQuery etc in the footer using a script loading call. Previously this worked with Forms.

    In the latest version, I get large red boxes in the forms saying that JQuery isn't loaded. If I follow the instructions to move the form scripts after our code to load JQuery, I still get the error. the only way I can get it to go away is to add the scripts in the head of the site.

  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Sep 16, 2016 @ 15:12
    Tim
    100

    Fixed the error. In the Scripts Partial, it runs the dependency check before the page has finished loading, so if you load the script in using require JS or similar, it breaks. I changed the detection code to:

    $(function () {
            performDependencyChecks('@Model.FormClientId');
        });
    

    You may want to add this to the Forms codebase!

  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Sep 16, 2016 @ 15:14
    Tim
    0

    Actually, scratch that, there's a bunch of stuff in the other script files that want jQuery before the page has finished loading, this might be a bigger issue.

  • Mark Gorman 5 posts 74 karma points
    Sep 19, 2016 @ 01:25
    Mark Gorman
    0

    Any luck with this? I am new here and also new to Umbraco and I am having the same issue.

    Thanks, Mark

  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Sep 19, 2016 @ 09:45
    Tim
    0

    Are you loading in JQuery and other dependencies via a loader like app JS? If so, it won't currently work, unless you loads the scripts in the header. loading in the footer seems to cause some issues. We're still investigating this and trying to work round it.

    If you're not using a script loader, just make sure you have the three required scripts included in the head of the page: https://our.umbraco.org/documentation/products/umbracoforms/developer/prepping-frontend/

  • Mark Gorman 5 posts 74 karma points
    Sep 19, 2016 @ 19:24
    Mark Gorman
    0

    Thanks Tim, I added that to my template in the cms and it fixed the issue.

Please Sign in or register to post replies

Write your reply to:

Draft