Server Error in '/' Application. ________________________________________ Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption) +54 umbraco.controls.ContentControl..ctor(Content c, publishModes CanPublish, String Id) +782 umbraco.cms.presentation.editContent.OnInit(EventArgs e) +368 System.Web.UI.Control.InitRecursive(Control namingContainer) +333 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
________________________________________ Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016
Error from IE (trying to delete from "Created packages"
Brugeragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2) Tidsstempling: Sun, 15 Nov 2009 10:05:49 UTC
I did some testing with Henrik's solution. It seems that there's some datainconsistency that makes some trouble.
I've not been able to clean the database enough to make the error dissapear but I've looked into how controls are added to the page. I've just added a check if the property is really there.
In ContentControl.cs's constructor (in from umbraco.presentation) the following line:
I wanted to add that I was receiving this same problem and doing a an iireset fixed the problem (it was a full iisreset, not just the site, fyi - might have worked for just the site also, but I'm not sure).
I'm on 4.7.0 and I just deleted a document property and created a new one. First with the same alias and then with another, but either way gives me the attached error.
If the property is located on the 'Generic Properties' tab, it doesn't fail, but the property is hidden or gone so to speak. If I move the property to a tab that is inherited from my master document, I get the attached error.
The original property was the DAMP- Media picker, but the new one is the uComponents - MultiNode Tree Picker.
My biggets problem is that the site is almost finished, and right now I cannot pick any media because of this error or create a new document that uses this document property. So folks, I really need your help on this one.
I am upgrading from 4.0.4.2 to 4.5. I have taken full copy of files and datbase and doing upgradation on back up. After 3rd step of upgradation, i am getting following error.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] umbraco.presentation.install.steps.defaultUser.Page_Load(Object sender, EventArgs e) +106 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +91 System.Web.UI.Control.LoadRecursive() +74 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
Sounds like maybe you didn't copy all the required files for the upgrade, are you sure copied the /bin/, /install/, /umbraco/ and /umbraco_client/ folders? There are also some changes in the configs but I think this error is probably related to the install folder
Object reference not set to an instance of an object
Perhaps someone tried this before?
It started out when I added a property to a master-documenttype.
I noticed that it did not show up on all my nodes (that documenttype)
Then I tried to delete the property, but it failed with: Object reference not set to an instance of an object.
Now all the nodes with the buggy documenttype are shown as: "Object reference not set to an instance of an object" when loading from the Umbraco GUI.
Pages are still showing as normal.
I can get the error to go away (for some time) if I publish the top-node and all sub-nodes.
Object reference not set to an instance of an object, are also showing when I try to delete a package from "Created packages".
Umbraco: 4.0.2.1
dotNET: 3.5
IIS: 7
OS: Win2008srv
Any help are most welcome :)
/henrik
Error in Umbraco
Server Error in '/' Application.
________________________________________
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption) +54
umbraco.controls.ContentControl..ctor(Content c, publishModes CanPublish, String Id) +782
umbraco.cms.presentation.editContent.OnInit(EventArgs e) +368
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
________________________________________
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016
Error from IE (trying to delete from "Created packages"
Brugeragent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)
Tidsstempling: Sun, 15 Nov 2009 10:05:49 UTC
Meddelelse: Sys.Net.WebServiceFailedException: The server method 'Delete' failed with the following error: System.NullReferenceException-- Object reference not set to an instance of an object.
Linje: 4723
Tegn: 21
Kode: 0
URI: http://dfs.local/ScriptResource.axd?d=pAzdlfmOOKuK0X3z3U0M0LakJko0vX15h1_V7pbdtdr_8_ssG1lK82CeguKrmKPffzx5_5AoEdW7FnsY9jlJ76qzqwIMW3ShqhvzVnq1lM01&t=2ead55ef
I have tryed something similar long ago, I solved it by deleting a few rows in the DB, think it was in the PropertyData table.
/Ronnie
Hi Hendrik,
I had the same issue a few weeks back and wrote a blogpost how to solve it. Hope it helps you.
Cheers,
Richard
@ronnie: which rows did you delete? :-)
@Richard: So adding this little thingie might help, you think?
obj = c.getProperty(this);
if (obj != null)
obj.delete();
/Jesper
I did some testing with Henrik's solution. It seems that there's some datainconsistency that makes some trouble.
I've not been able to clean the database enough to make the error dissapear but I've looked into how controls are added to the page. I've just added a check if the property is really there.
In ContentControl.cs's constructor (in from umbraco.presentation) the following line:
Is changed to:
As a result the page is rendered and editable in Umbraco GUI. I've not tested it that much but it seems to do the trick.
/Jesper
Hi, guys.
I thought this was fixed in 4.5 but I still get the same error when I add the data type (ImageCropper) for my media type (Image)
Can I use the same fix as above? (Can not immediately locate the files)
/Anders
I wanted to add that I was receiving this same problem and doing a an iireset fixed the problem (it was a full iisreset, not just the site, fyi - might have worked for just the site also, but I'm not sure).
Brian --
What version are you on?
I'm on 4.0.3 right now.
Hello folks
Let me raise this one from the grave ...
I'm on 4.7.0 and I just deleted a document property and created a new one. First with the same alias and then with another, but either way gives me the attached error.
If the property is located on the 'Generic Properties' tab, it doesn't fail, but the property is hidden or gone so to speak.
If I move the property to a tab that is inherited from my master document, I get the attached error.
The original property was the DAMP- Media picker, but the new one is the uComponents - MultiNode Tree Picker.
My biggets problem is that the site is almost finished, and right now I cannot pick any media because of this error or create a new document that uses this document property.
So folks, I really need your help on this one.
Hi,
Please can any one help?
I am upgrading from 4.0.4.2 to 4.5. I have taken full copy of files and datbase and doing upgradation on back up. After 3rd step of upgradation, i am getting following error.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Thanks
Krishna
Any information regardin this
Sounds like maybe you didn't copy all the required files for the upgrade, are you sure copied the /bin/, /install/, /umbraco/ and /umbraco_client/ folders? There are also some changes in the configs but I think this error is probably related to the install folder
i also get same error
my code is here ,
<form runat="server" id="aaass">
<asp:ScriptManager runat="server">
</asp:ScriptManager>
<umbraco:Macro PollNodeId="1218" DisplayOnly="1" SubmitOnSelect="1" HideSubmit="1" SortResults="1" WidthTotalVotes="1" HideQuestion="1" RandomPoll="1" Alias="Poll" runat="server"></umbraco:Macro>
</form>
tell me any change in code
Thanks
again
Hi,
Due to performance issue , I have added the publishing code in thread
try
{
HttpontextforMailSending gethttpcontextforpublish2 = new HttpontextforMailSending()
{
HttpContextReference = HttpContext.Current,
courseDocument = shortCourseDocument,
createdUser = new User(0)
};
Thread t2 = new Thread(PublishDocument);
t2.Start(gethttpcontextforpublish2);
}
catch
{
}
private void PublishDocument(object input)
{
HttpontextforMailSending httpcontextformail = (HttpontextforMailSending)input;
Document course = httpcontextformail.courseDocument;
User createduser = httpcontextformail.createdUser;
if (course != null && createduser != null)
{
course.Publish(createduser);
umbraco.library.UpdateDocumentCache(course.Id);
}
}
public class HttpontextforMailSending
{
public HttpContext HttpContextReference { get; set; }
public Document courseDocument { get; set; }
public User createdUser { get; set; }
}
but i got "Object reference not set to an instance of an object" error on "course.Publish(createduser);"
Please anyone help me to solving this.
Thanks
Jeeshna
is working on a reply...