Copied to clipboard

Flag this post as spam?

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


  • Kyle Jorve 11 posts 94 karma points
    Dec 08, 2020 @ 22:01
    Kyle Jorve
    1

    UmbracoForms.js error on line 370

    I recently installed Umbraco Forms on a new project. Never had this issue before and I'm not sure where it's originating. I created a new form, placed it in a template, and now I get this error in the console:

    Uncaught TypeError: Cannot read property 'querySelectorAll' of null
    at Object.UmbracoFormsConditions.self.watch (umbracoforms.js:370)
    at init (umbracoforms.js:60)
    at initCollection (umbracoforms.js:40)
    at listen (umbracoforms.js:32)
    at umbracoforms.js:20
    at umbracoforms.js:551
    

    I've installed Umbraco Forms 8.6.0.

    The line in question is this, which is inside self.watch:

    var datepickerfields = self.form.querySelectorAll('.datepickerfield');
    
  • Kyle Jorve 11 posts 94 karma points
    Dec 09, 2020 @ 00:06
    Kyle Jorve
    0

    I managed to fix it--I think. But the only way I could was by reverting to an older version of umbracoforms.js. After I did that, the error went away.

  • Kyle Jorve 11 posts 94 karma points
    Dec 09, 2020 @ 01:01
    Kyle Jorve
    0

    The older version, by the way, was dependent on jQuery. Looks like the new version was an attempt to remove that dependency.

  • rubenberendsen 3 posts 24 karma points
    1 week ago
    rubenberendsen
    1

    I have the same issue at UmbracoForms 8.6.0 and also on 8.6.1.

    It seems that the code will run correct also if there is a datapicker in the form

  • lori ryan 194 posts 524 karma points
    1 week ago
    lori ryan
    0

    I have a similar issue.

  • rubenberendsen 3 posts 24 karma points
    4 days ago
    rubenberendsen
    0

    There is a fix/solution for this issue:

    https://github.com/umbraco/Umbraco.Forms.Issues/issues/490

Please Sign in or register to post replies

Write your reply to:

Draft