Add data on FAQ data type gives InvalidOperationException

Topics: Standard packages, Troubleshooting
Mar 14, 2011 at 8:34 PM

Hi guys,

I get an error when calling "add data" on Composite.Lists.FAQ. FAQ target and FAQtype were fine. After clicking Add Data, I get a Server Error page saying "An unfortunate error has occurred." Process followed was as per http://docs.composite.net/C1/Packages/Lists/CompositeListsFAQ.aspx. The error from log is as below.

CompositeC1 version is 2.1 - upgraded from previous latest version by xcopy of 2.1 release into web directory.

I fired up process monitor, but it didn't give me any clues beyond CMS_1FA672EB_A510B035_v0001_948074ea-4d93-47ba-8e0c-6267501f2d0b being specified in FAQ.xml, and the error being thrown from line 39 in flowUI.aspx

I'll keep digging, but any pointers would be appreciated.

Thanks,

Andy

System.InvalidOperationException: The type Composite.Plugins.Functions.WidgetFunctionProviders.StandardWidgetFunctionProvider.DataReference.DataReferenceSelectorWidgetFunction`1[[Composite.Lists.FAQType, CMS_1FA672EB_A510B035_v0001_948074ea-4d93-47ba-8e0c-6267501f2d0b, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], Composite, Version=1.2.3321.23866, Culture=neutral, PublicKeyToken=null could not be found
   at Composite.Core.Types.TypeManagerImpl.GetType(String fullName)
   at Composite.Core.Types.ValueTypeConverter.Convert(Object value, Type targetType)
   at Composite.C1Console.Forms.Foundation.FormTreeCompiler.PropertyAssigner.SetPropertyOnProducer(ElementCompileTreeNode element, String propertyName, PropertyCompileTreeNode property, CompileContext compileContext)
   at Composite.C1Console.Forms.Foundation.FormTreeCompiler.PropertyAssigner.AssignPropertiesToProducer(ElementCompileTreeNode element, CompileContext compileContext)
   at Composite.C1Console.Forms.Foundation.FormTreeCompiler.CompilePhases.EvaluatePropertiesPhase.HandleProducerElement(ElementCompileTreeNode element, List`1 newProperties, String defaultOverloadPropertyName)
   at Composite.C1Console.Forms.Foundation.FormTreeCompiler.CompilePhases.EvaluatePropertiesPhase.Evaluate(ElementCompileTreeNode node, List`1 newProperties, String defaultOverloadPropertyName)
   at Composite.C1Console.Forms.Foundation.FormTreeCompiler.CompilePhases.EvaluatePropertiesPhase.Evaluate(ElementCompileTreeNode node, List`1 newProperties, String defaultOverloadPropertyName)
   at Composite.C1Console.Forms.Foundation.FormTreeCompiler.CompilePhases.EvaluatePropertiesPhase.Evaluate(ElementCompileTreeNode node, List`1 newProperties, String defaultOverloadPropertyName)
   at Composite.C1Console.Forms.Foundation.FormTreeCompiler.CompilePhases.EvaluatePropertiesPhase.Evaluate(ElementCompileTreeNode node, List`1 newProperties, String defaultOverloadPropertyName)
   at Composite.C1Console.Forms.Foundation.FormTreeCompiler.CompilePhases.EvaluatePropertiesPhase.Evaluate(ElementCompileTreeNode node, List`1 newProperties, String defaultOverloadPropertyName)
   at Composite.C1Console.Forms.Foundation.FormTreeCompiler.CompilePhases.EvaluatePropertiesPhase.Evaluate(ElementCompileTreeNode node, List`1 newProperties, String defaultOverloadPropertyName)
   at Composite.C1Console.Forms.Foundation.FormTreeCompiler.CompilePhases.EvaluatePropertiesPhase.Evaluate(ElementCompileTreeNode node, List`1 newProperties, String defaultOverloadPropertyName)
   at Composite.C1Console.Forms.FormTreeCompiler.Compile(XmlReader reader, IFormChannelIdentifier channel, Dictionary`2 bindingObjects, Boolean withDebug, String customControlIdPrefix, Dictionary`2 bindingsValidationRules)
   at Composite.Core.WebClient.FlowMediators.FormFlowRendering.FormFlowUiDefinitionRenderer.Render(String consoleId, String elementProviderName, FlowToken flowToken, FormFlowUiDefinition formFlowUiCommand, IFormChannelIdentifier channel, Boolean debugMode, FlowControllerServicesContainer servicesContainer)
   at Composite.Core.WebClient.FlowMediators.WebFlowUiMediator.GetFlowUi(FlowHandle flowHandle, String elementProviderName, String consoleId, String& uiContainerName)

 

Coordinator
Mar 14, 2011 at 9:35 PM

xcopy'ing the 2.1 release website into your existing 2.0 website is not a recommended way to upgrade. The issue you experience is most likely caused by this.

I suggest you revert to a backup taken prio to the xcopy'ing and then upgrade using the steps described at http://compositec1.codeplex.com/discussions/249573

 

Mar 14, 2011 at 9:49 PM

Thanks, I will do and I'll report back. We didn't spot the upgrade discussion - I don't think the release notes were posted when we did the download and upgrade.

Coordinator
Mar 14, 2011 at 9:53 PM

Sorry about that - I have updated the 2.1 release notes and added a link to the 'how to upgrade' thread.

Mar 15, 2011 at 4:57 PM

Hi guys,

Well, the good news is we've now spent a day and tried both upgrading the website according to the release notes, and also rebuilding the website from scratch in a fresh install of v2.1.

The bad news is that we still get the error when doing "add data" on the Composite.Lists.FAQ data type.

Any suggestions?

Andy

Coordinator
Mar 15, 2011 at 8:50 PM

Hi Andy,

I installed a fresh 2.1 site with the OmniCorp demo and added the package - I'm unable to repro the error (can add data just fine), but I can see that the FAQ package ships with an 'edit form XML' file that smells like trouble.

Could you try to temporarily remove the file "~/App_Data/Composite/DynamicTypeForms/Composite/Lists/FAQ.xml" and see if this resolve your problem?

If it does, reintroduce the file and replace the following:

Line 32 (starting with <f:StaticMethodCall ) should be:
<f:StaticMethodCall Type="&lt;t n=&quot;Composite.Plugins.Functions.WidgetFunctionProviders.StandardWidgetFunctionProvider.DataReference.DataReferenceSelectorWidgetFunction`1, Composite&quot;&gt;&#xD;&#xA;  &lt;t n=&quot;DynamicType:Composite.Lists.FAQType&quot; /&gt;&#xD;&#xA;&lt;/t&gt;" Method="GetOptions" Parameters="DynamicType:Composite.Lists.FAQType" />

Line 40 (starting with <f:StaticMethodCall ) should be:
<f:StaticMethodCall Type="&lt;t n=&quot;Composite.Plugins.Functions.WidgetFunctionProviders.StandardWidgetFunctionProvider.DataReference.DataReferenceSelectorWidgetFunction`1, Composite&quot;&gt;&#xD;&#xA;  &lt;t n=&quot;DynamicType:Composite.Lists.FAQTarget&quot; /&gt;&#xD;&#xA;&lt;/t&gt;" Method="GetOptions" Parameters="DynamicType:Composite.Lists.FAQTarget" />

The issue is in the way that CLR type names are serialized - on way old versions of Composite C1 we serialized type names in a way that is prone to errors like this. Looks like the FAQ parts are some years old and haven't been refreshed.

I hope this solve your issue and I'm sorry for the inconvenience this has caused you. We will fix this in the FAQ package and go through other packages and check if we have similar issues.

Coordinator
Mar 16, 2011 at 8:15 AM
Edited Mar 16, 2011 at 8:15 AM
>> Any suggestions?
Search for an xml file that contains string
"CMS_1FA672EB_A510B035_v0001_948074ea-4d93-47ba-8e0c-6267501f2d0b"

What you find it replace:
"Composite.Lists.FAQType, CMS_1FA672EB_A510B035_v0001_948074ea-4d93-47ba-8e0c-6267501f2d0b"
with either
"DynamicType:Composite.Lists.FAQType"
or
"Composite.Lists.FAQType, Composite.Generated"
Mar 16, 2011 at 1:32 PM

new version is online: Composite.Lists.FAQ version="1.1.1" - fixed  form markup - FAQ.xml.

Mar 16, 2011 at 5:24 PM
Edited Mar 17, 2011 at 10:59 AM

We tried mawtex's fix, and it certainly let us add data to the FAQ data type. We didn't try testing any further. The fix certainly made sense: as per the info in the original post we'd tracked the reference to the assembly down to FAQ.xml.

@napernik, I'm afraid we didn't try your fix.

@aeont: Ultimately though we rolled the site back to pre-FAQ install (so a fresh 2.1 composite install) and then installed the latest FAQ. This seems to work with no issues.

@Mawtex - if it helps I'm quite happy to send you the site which wasn't working, though it may be irrelevant now. Let me know.

Andy

(edited for clarity - the original post was made at the end of a long day!)

Mar 17, 2011 at 11:00 AM

Just to let you know, we now have tested the FAQs end-to-end with 1.1.1 on a fresh 2.1 install with no problems.

Andy

Coordinator
Mar 17, 2011 at 11:56 AM

@AGBrown Super - looks like we nailed it. With the details of your initial report and your confirmation on the fix I don't think we need the site, but thanks for the offer - a "repro site" can be invaluable :)