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?
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 ;)
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.
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.
Hey Simon, just checking that you followed all of the upgrade instructions including copying over the two new config files in the config folder?
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:
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
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.
is working on a reply...