Try our conversational search powered by Generative AI!

xforms exception after migrating

Vote:
 

After migrating my site to 5.2 with the migration tool I get the following exception when opening the xforms dialog for a property in edit mode. 
/Björn Gullander
  
Serverfel i tillämpningsprogrammet /. 
--------------------------------------------------------------------------------
Objektreferensen har inte angetts till en instans av ett objekt.
Beskrivning: Ett undantag som inte kunde hanteras uppstod när den aktuella webbegäran kördes. Mer information om felet och var i koden det uppstod finns i stackspårningen. 
Undantagsinformation: System.NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.
Källfel: 
Ett undantag som inte hanteras genererades vid körningen av den aktuella webbegäran. Information om undantagets ursprung och plats kan identifieras med undantagsstackspårningen nedan. 
Stackspårning: 
[NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.]
   EPiServer.Util.XFormHelper.ListFormReferences(String formId) +178
   EPiServer.UI.Edit.XFormSelect.GetxFormUsedonPages(String formId) +23
   EPiServer.UI.Edit.XFormSelect.LoadForms(String folder, Boolean iListMyFormOnly, Boolean loadSelectedFormPageIndex) +665
   EPiServer.UI.Edit.XFormSelect.OnLoad(EventArgs e) +356
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
 
--------------------------------------------------------------------------------
Versionsinformation: Microsoft .NET Framework-version:2.0.50727.3082; ASP.NET-version:2.0.50727.3082 
After migrating my site to 5.2 with the migration tool I get the following exception when opening the xforms dialog for a property in edit mode. 
/Björn Gullander
  Serverfel i tillämpningsprogrammet /. --------------------------------------------------------------------------------
Objektreferensen har inte angetts till en instans av ett objekt.Beskrivning: Ett undantag som inte kunde hanteras uppstod när den aktuella webbegäran kördes. Mer information om felet och var i koden det uppstod finns i stackspårningen. 
Undantagsinformation: System.NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.
Källfel: 
Ett undantag som inte hanteras genererades vid körningen av den aktuella webbegäran. Information om undantagets ursprung och plats kan identifieras med undantagsstackspårningen nedan. 
Stackspårning: 
[NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.]   EPiServer.Util.XFormHelper.ListFormReferences(String formId) +178   EPiServer.UI.Edit.XFormSelect.GetxFormUsedonPages(String formId) +23   EPiServer.UI.Edit.XFormSelect.LoadForms(String folder, Boolean iListMyFormOnly, Boolean loadSelectedFormPageIndex) +665   EPiServer.UI.Edit.XFormSelect.OnLoad(EventArgs e) +356   System.Web.UI.Control.LoadRecursive() +50   System.Web.UI.Control.LoadRecursive() +141   System.Web.UI.Control.LoadRecursive() +141   System.Web.UI.Control.LoadRecursive() +141   System.Web.UI.Control.LoadRecursive() +141   System.Web.UI.Control.LoadRecursive() +141   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
 

--------------------------------------------------------------------------------Versionsinformation: Microsoft .NET Framework-version:2.0.50727.3082; ASP.NET-version:2.0.50727.3082 
#37633
Mar 15, 2010 14:07
Vote:
 

Hi Björn, did you solve this?

#37843
Mar 22, 2010 16:11
Vote:
 

Nope, still same problem... Cant open to choose any x-form. Still getting the same error...

Anyone got any idéa?

[NullReferenceException: Object reference not set to an instance of an object.]
   EPiServer.Util.XFormHelper.ListFormReferences(String formId) +178
   EPiServer.UI.Edit.XFormSelect.GetxFormUsedonPages(String formId) +23
   EPiServer.UI.Edit.XFormSelect.LoadForms(String folder, Boolean iListMyFormOnly, Boolean loadSelectedFormPageIndex) +665
   EPiServer.UI.Edit.XFormSelect.OnLoad(EventArgs e) +356
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

#38944
Apr 26, 2010 10:56
Vote:
 

When looking at the code that throws the exception, could you please see below

Hashtable defTypeNames = new Hashtable();

ArrayList pageDefsWithNullTypes = new ArrayList();
foreach (PageType type in PageType.List())
foreach (PageDefinition def in type.Definitions)
{
if (def.Type == null)
{
pageDefsWithNullTypes.Add(def);
continue;
}
if (def.Type.Name.IndexOf("XForm") != -1 && !defTypeNames.Contains(def.Name))
defTypeNames.Add(def.Name, def.Name);
}


My guess is that something is wrong in some pagetype. E.g. it could be that for some reason some property misses a Type.
My suggestion would be to try to run the following code under a debugger against your database

#39154
Edited, May 05, 2010 5:23
Vote:
 

Hi,

I'm wonering how you solved this issue. Would be very helpful if you can help since I have the same problem after migration to CMS 6 R2.

Best regards,

Maryam

#54901
Nov 09, 2011 9:45
Vote:
 

Hi,
We're also facing the same problem and therefore very interested in a solution.
Many thanks for any hints.

Best Regards
Xuan

#66187
Feb 22, 2013 11:05
Vote:
 

We are also facing the same problem, Does anybody has a solution for this?

#66503
Mar 01, 2013 18:15
Vote:
 

I think we had something like this and if I remember correctlu it was a broken pagetypedefinition in the databas. Strange enouggh both creating new and browsing already existing pages of the offending type worked. 

#66504
Mar 01, 2013 19:41
Vote:
 

Thank you for your help. Especially Huy and Per Nergård. I didn't get your answers at the first sight. But after using reflection on the method EPiServer.Util.XFormHelper.ListFormReferences(string formId) and debugging its code I finally understood Huy's hint. 

There could be any broken Pagetype which interferes with the xform functionality. That is really a painful side effect.

So to wrap it up: Just click all the pagetype in the backend admin pagetype section to verify if they work. After identifying the culprit try to remove him carefully from the database. 

#66565
Mar 05, 2013 11:42
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.