3

When I hit the 'Insert image' button in the rich text editor bar, the modal opens but then an error page appears:

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

Stacktrace:
[NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.]
umbraco.controls.Images.ImageViewer.OnPreRender(EventArgs e) +70
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Control.PreRenderRecursiveInternal() +168
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974

Versiondata: Microsoft .NET Framework Versie:4.0.30319; ASP.NET Versie:4.0.30319.17929 

Running Umbraco 6.1.3 on localhost and on server, both give the error. I have already tried to replace the umbraco.dll and umbraco.editorControls.dll with fresh ones, but to no avail. I also checked all my datatypes, but none are corrupt (as per Rich Text Editor and Inserting Images getting error and http://our.umbraco.org/forum/using/ui-questions/39103-Problem-with-Rich-Text-Editor-and-Inserting-Images). I am using uComponents, but I have the most recent version (5.5.0)

Community
  • 1
  • 1
Daniël Tulp
  • 1,745
  • 2
  • 22
  • 51
  • Does the umbraco user have access to the media section? I've seen this error when they don't. – Douglas Ludlow Aug 18 '13 at 13:44
  • I also get the error as admin, and the user had already uploaded some pictures to the media section – Daniël Tulp Aug 18 '13 at 15:40
  • Is this an upgrade from a previous version? Are you using any non-standard config for your media folder, e.g. a virtual directory? And did you say that this previously worked but now doesn't? – Digbyswift Aug 20 '13 at 10:30
  • I actually did an upgrade from 6.1.2 to 6.1.3, I tested it in 6.1.2 and not since my upgrade, so that could be the culprit, what could have gone wrong, how should I fix it? – Daniël Tulp Aug 20 '13 at 11:37
  • I did the upgrade in visual studio 2012 with the NuGet Umbraco NuGet package (see http://stackoverflow.com/questions/17521154/how-to-setup-umbraco-6-1-2-in-visual-studio-2012-with-mvc-enabled-to-use-in-tfs/17523351) but I think I didn't upgrade the Umbraco files (only binaries) so I'll try that – Daniël Tulp Aug 20 '13 at 12:05
  • woohooo, that did it. I had forgotten to update the files also and then it missed some properties send to the a dll file; @Digbyswift if you think you deserve the 50 points for pointing me to the possibility that an update was the culprit, add it as an answer and I will gladly accept – Daniël Tulp Aug 20 '13 at 12:22

2 Answers2

1

If this is an update from a previous version, check that the configuration settings are all present, especially any specific to the media folder. It sounds like a setting just isn't present.

Also, often I forget to "include" all the files in my visual studio project too, so when I do a publish, any new files don't get included.

Digbyswift
  • 10,310
  • 4
  • 38
  • 66
0

I got this error when I upgraded an install from v6.1.1 to v6.1.6. Although the offcial instructions state that only the bin folder needs to be updated this is far from being the case. You also need to ensure you use the latest files under /Umbraco and also /Umbraco_client. If you check the namespaces in /Umbraco/Controls/Images, for example you'll see it now lives in a different namespace

'<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="ImageViewer.ascx.cs" Inherits="Umbraco.Web.UI.Umbraco.Controls.Images ... %>

to the original:

'<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ImageViewer.ascx.cs" Inherits="umbraco.controls.Images.ImageViewer" %>'

I've been working with Umbraco for just over six months and in that time I've yet to see a document from them that is accurate or complete. FFS.

immutabl
  • 6,857
  • 13
  • 45
  • 76