Copied to clipboard

Flag this post as spam?

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


  • Alastair 2 posts 22 karma points
    Jun 30, 2015 @ 07:25
    Alastair
    0

    Object reference not set to an instance of an object.

    Hi,

    I'm trying to use the BackOffice SCSS editor project with my Umbraco 7 installation. After a few hurdles I managed to get it installed, however now when I go to save the test SCSS rule I've applied I get an error and the file doesn't save. I was wondering if anyone could enlighten me as to what it may be?

    I'm very new to Umbraco so I apologize in advance if I don't understand anything completely at first. And also I struggled to find a suitable category to put this under, so sorry if it's in the wrong place!

    The error is as follows:

    Object reference not set to an instance of an object.

    EXCEPTION DETAILS:

    System.NullReferenceException: Object reference not set to an instance of an object. STACKTRACE:

    at Umbraco.Web.WebApi.Filters.DisableBrowserCacheAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext) at System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecuted(HttpActionContext actionContext, HttpResponseMessage response, Exception exception)
    at System.Web.Http.Filters.ActionFilterAttribute.<>cDisplayClass2.1(CatchInfo1 info) at System.Threading.Tasks.TaskHelpersExtensions.<>c__DisplayClass41.

  • Jason 122 posts 637 karma points
    Jul 09, 2015 @ 17:26
    Jason
    0

    Alastair, welcome to Umbraco and sorry for the super slow reply, just found your post.

    This issue you are having is because you don't have the needed handlers configured in your web.config. For scss files that do not begin with an underscore, the editor does a test compile to check for any errors and with out the handlers the compile false causing the error.

    Here is what you need to do:

    Add the below httpHandler reference into your web.config under the httpHandlers node:

    <add path="*.scss" verb="GET" type="dtp.umb.scsseditor.cd.SassHandler, dtp.umb.scsseditor.cd" />
    

    Also add this handler under the system.webServer -> handlers node:

    <remove name="DtpScssHandler" />
    <add name="DtpScssHandler" path="*.scss" verb="GET" type="dtp.umb.scsseditor.cd.ScssHandler, dtp.umb.scsseditor.cd" resourceType="File" preCondition="" />
    

    This info is also on the package download page in the install instructions. Once you have those added reference to the handlers you should be able to save the scss file without an error. Hope this helps.

    For future reference, most third party packages usually have links on the package download page (at the bottom) for reporting issues with packages or asking question about the package. I only found your post because I ran into the same issue and I Googled the error. Seems that I forgot how to install my own package.

  • Alastair 2 posts 22 karma points
    Jul 10, 2015 @ 06:48
    Alastair
    0

    Hi Jason,

    No problem at all, thank you for getting back to me and my apologies for posting this in the wrong area!

    Unfortunately I already have all three of the those lines of code added to my web.config file!

  • Jason 122 posts 637 karma points
    Jul 10, 2015 @ 20:03
    Jason
    0

    I had that happen also. For me I had an error in one of the scss included files. and some caching issues. Try calling the main.scss file directly from a browser and see it it displays compiled CSS. ex: http://

    Also make sure that in your web.config in the compilation node that debug is set to true while you are developing. Clearing cache and recycling the app pool wouldn't hurt.

Please Sign in or register to post replies

Write your reply to:

Draft