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.Forms.CodeFirst.FormManager.SynchronizeForm(Type typeForm) in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\FormBuilder\FormManager.cs:426
Umbraco.Forms.CodeFirst.FormManager.SynchronizeForms() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\FormBuilder\FormManager.cs:201
Umbraco.Forms.CodeFirst.FormManager.Synchronize() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\FormBuilder\FormManager.cs:24
Umbraco.Forms.CodeFirst.UmbracoManager.Synchronize() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\UmbracoManager.cs:36
Umbraco.Forms.CodeFirst.UmbracoManager.SynchronizeIfNotSynchronized() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\UmbracoManager.cs:21
Umbraco.Forms.CodeFirst.ContourFormBuilderHttpModule.context_BeginRequest(Object sender, EventArgs e) in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\ContourFormBuilderHttpModule.cs:27
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +164
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18044
I have tried to update contour with latest nightly build 3.0.15 but got the same message.
Does someone have ideas about why this error occurs and how I can update My contour version to solve this.
Issue during Synchronize on umbraco v6.1.2
Hi everyone,
We are testing Umbraco Contour Code first before buying a complete licence and we cannot get our CodeFirst form being synchronize :
It fails with the following message :
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:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18044
I have tried to update contour with latest nightly build 3.0.15 but got the same message.
Does someone have ideas about why this error occurs and how I can update My contour version to solve this.
Regards
David
Comment author was deleted
Not sure why but will try your example and see if I can reproduce the error and then fix it :)
Comment author was deleted
Can confirm the issue, getting the same YSOD, looking into fix now :)
Comment author was deleted
Ah I see it's because you are using a fieldtype that uses prevalues but aren't supplying any values for it :)
Comment author was deleted
So try
[Field(FormPages.Contact, FormFieldsets.Details, Type = typeof(DropDownList), Mandatory = true, Prevalues = new[] { "Matt", "Joanne", "Robert" })] public string Topic { get; set; }
For your Topic field, setting the prevalues
Prevalues = new[] { "Matt", "Joanne", "Robert" })
Comment author was deleted
Should look nicer now ;)
Hi Tim,
I finally use :
Since my data source for Topic are Prevalues obtained via XPATH but you definitely solve my issue.
Thanks
Comment author was deleted
Ah yes you can also set it to use a prevalue source of course :) , glad it's working now!
I had same issue but with a radio Button list,
[Field("signUp", "Details",
Type = typeof(RadioButtonList),
Prevalues = new[] { "Bronze", "Silver", "Gold" },
Caption = "Package")]
public string Package { get; set; }
and was missing the pre-values , could help if the error told you which field or object was null but thanks to the above, got it orted now :).
is working on a reply...