Copied to clipboard

Flag this post as spam?

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


  • Scott Ritshie 35 posts 100 karma points
    May 08, 2016 @ 18:12
    Scott Ritshie
    0

    Error on comment save

    Hey there,

    I have the latest SmartBlog installed and, when I post a comment, it errors out with "Object reference not set to an instance of an object." I have jQuery 2.2.3 installed locally and have edited Main.SmartBlog.js to load the validation files locally:

    // --------------- Query actions --------------- //
        getScript('/scripts/jquery-2.2.3.min.js', function () {
        // -------- MVC Client Side Validation ---------- //
        getScript('/scripts/jquery.validate.min.js');
        getScript('/scripts/jquery.validate.unobtrusive.min.js');
        getScript('/scripts/jquery.unobtrusive-ajax.min.js');
    

    Note that I added unobtrusive-ajax.min to troubleshoot, but have tried without, still throwing an error. The comments save as expected, but ajax isn't working correctly. I have tried the default blog installed into a clean Umbraco 7.3.4 install and have the same issue as the blog install into an existing site.

    Since the current site uses jQuery, I added a true/false field to the blog root that disables the inherent jQuery from the existing site to ensure duplicated jQuery calls are avoided. The master page looks for a true value and doesn't load jQuery or the local validation files in the master, instead allowing main.SmartBlog.js to load the js files solely.

    These are all just hacks to try to get it to post and re-load the page asynchronously without erroring. So far, nothing has worked.

    Any thoughts?

    Thanks! Scott

Please Sign in or register to post replies

Write your reply to:

Draft