Copied to clipboard

Flag this post as spam?

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


  • Simon Dingley 1431 posts 3332 karma points c-trib
    Aug 07, 2012 @ 13:36
    Simon Dingley
    0

    After upgrade to v4.8 - Media Uploads Fail

    After recently upgrading a site to v4.8 from v4.7.2 it is no longer possible to upload files to the media as the following exception is thrown.

    System.NullReferenceException: Object reference not set to an instance of an object.
    Generated: Tue, 07 Aug 2012 11:30:48 GMT
    
    System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at umbraco.cms.businesslogic.datatype.FileHandlerData.set_Value(Object value)
       at umbraco.editorControls.uploadField.Save()
       at umbraco.controls.ContentControl.saveClick(Object Sender, ImageClickEventArgs e)
       at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
       at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.HandleError(Exception e)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    
    I'm sure I can't be the first to have experienced but couldn't find anything directly related to it - any ideas anyone on why it happens and how to resolve?
    Thanks, Simon
  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Aug 07, 2012 @ 14:43
    Sebastiaan Janssen
    0

    Hey Simon, just checking that you followed all of the upgrade instructions including copying over the two new config files in the config folder?

  • Morten Christensen 596 posts 2770 karma points admin hq c-trib
    Aug 08, 2012 @ 09:38
    Morten Christensen
    2

    Hi Simon,

    As mentioned on twitter this error is due to a change in the umbracoSettings.config (//settings/content/imaging) file for the 4.8.0. This section currently looks like this:

             <imaging>
                <!-- what file extension that should cause umbraco to create thumbnails -->
                <imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
                <!-- what attributes that are allowed in the editor on an img tag -->
                <allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
                <!-- automatically updates dimension, filesize and extension attributes on upload -->
                <autoFillImageProperties>
                    <uploadField alias="umbracoFile">
                        <widthFieldAlias>umbracoWidth</widthFieldAlias>
                        <heightFieldAlias>umbracoHeight</heightFieldAlias>
                        <lengthFieldAlias>umbracoBytes</lengthFieldAlias>
                        <extensionFieldAlias>umbracoExtension</extensionFieldAlias>
                    </uploadField>
                </autoFillImageProperties>
            </imaging>

     Everything under autoFillImageProperties is new in 4.8.0, so if you are upgrading you most merge the config files. Unfortunately there wasn't a proper checking of these settings implemented, which is causing the exception you are seeing. We will release a 4.8.1 patch release, which will fix this but you should still merge the configs for the best result and to avoid problems ;)

    - Morten

  • Simon Dingley 1431 posts 3332 karma points c-trib
    Aug 08, 2012 @ 10:09
    Simon Dingley
    0

    Thanks Morten, an oversight on my part during the upgrade process but agreed it should fail gracefully as unfortunately the client discovered this before me on this occasion. 

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies