Try our conversational search powered by Generative AI!

Error in Mediachase.Commerce.Engine.Template.TemplateService

Vote:
 

Hi! Upgrade from 5.2 to commerce manager 8.7.1

Suddenly the NotifyEmailTemplate service don't work anymore

Message.Body = TemplateService.Process(Template, Thread.CurrentThread.CurrentCulture, DictionaryObject);

Are this TemplateService still in use? Any idea?

Error:
[NotSupportedException: Cannot serialize member Mediachase.Commerce.Orders.Shipment.OperationKeysMap of type System.Collections.Concurrent.ConcurrentDictionary`2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Collections.Generic.IEnumerable`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], because it implements IDictionary.]
   System.Xml.Serialization.TypeScope.GetDefaultIndexer(Type type, String memberInfo) +7521758
   System.Xml.Serialization.TypeScope.GetCollectionElementType(Type type, String memberInfo) +40
   System.Xml.Serialization.TypeScope.ImportTypeDesc(Type type, MemberInfo memberInfo, Boolean directReference) +1170
   System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError) +263
   System.Xml.Serialization.StructModel.GetPropertyModel(PropertyInfo propertyInfo) +134
   System.Xml.Serialization.StructModel.GetFieldModel(MemberInfo memberInfo) +70
   System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +1158
   System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +483
   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1656

[InvalidOperationException: There was an error reflecting type 'Mediachase.Commerce.Orders.Shipment'.]
   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +7518491
   System.Xml.Serialization.XmlReflectionImporter.CreateArrayElementsFromAttributes(ArrayMapping arrayMapping, XmlArrayItemAttributes attributes, Type arrayElementType, String arrayElementNs, RecursionLimiter limiter) +416
   System.Xml.Serialization.XmlReflectionImporter.ImportArrayLikeMapping(ArrayModel model, String ns, RecursionLimiter limiter) +284
   System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +7521048
   System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter) +197
   System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +1217

[InvalidOperationException: There was an error reflecting property 'Shipments'.]
   System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +3441
   System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +483
   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1656

[InvalidOperationException: There was an error reflecting type 'Mediachase.Commerce.Orders.OrderForm'.]
   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +7518491
   System.Xml.Serialization.XmlReflectionImporter.CreateArrayElementsFromAttributes(ArrayMapping arrayMapping, XmlArrayItemAttributes attributes, Type arrayElementType, String arrayElementNs, RecursionLimiter limiter) +416
   System.Xml.Serialization.XmlReflectionImporter.ImportArrayLikeMapping(ArrayModel model, String ns, RecursionLimiter limiter) +284
   System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +7521048
   System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter) +197
   System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +1217

[InvalidOperationException: There was an error reflecting property 'OrderForms'.]
   System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +3441
   System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +483
   System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter) +287
   System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter) +483
   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +1656

[InvalidOperationException: There was an error reflecting type 'Mediachase.Commerce.Orders.PurchaseOrder'.]
   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter) +7518491
   System.Xml.Serialization.XmlReflectionImporter.ImportElement(TypeModel model, XmlRootAttribute root, String defaultNamespace, RecursionLimiter limiter) +209
   System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace) +715
   Mediachase.Commerce.Engine.Template.Providers.XslTemplateProvider.Process(String template, CultureInfo culture, IDictionary context) +339
   Holmen.Externweb.Web.Templates.Public.Classes.Commerce.MailHelper.SendEmail(String ToEmail, String customerEmail, String ToName, String Subject, Dictionary`2 DictionaryObject, String Template) in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Classes\Commerce\MailHelper.cs:80
   Holmen.Externweb.Web.Templates.Public.Classes.Commerce.MailHelper.SendPurchaseOrderEmail(PurchaseOrder order, String email, String name) in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Classes\Commerce\MailHelper.cs:123
   Holmen.Externweb.Web.Templates.Public.Pages.Commerce.Checkout.CheckoutFinished.sendReceiptMail(PurchaseOrder po) in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Pages\Commerce\Checkout\CheckoutFinished.aspx.cs:316
   Holmen.Externweb.Web.Templates.Public.Pages.Commerce.Checkout.CheckoutFinished.ohRejoiceAllWentWell(PurchaseOrder po) in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Pages\Commerce\Checkout\CheckoutFinished.aspx.cs:243
   Holmen.Externweb.Web.Templates.Public.Pages.Commerce.Checkout.CheckoutFinished.convertCartToOrder() in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Pages\Commerce\Checkout\CheckoutFinished.aspx.cs:238
   Holmen.Externweb.Web.Templates.Public.Pages.Commerce.Checkout.CheckoutFinished.Page_Load(Object sender, EventArgs e) in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Pages\Commerce\Checkout\CheckoutFinished.aspx.cs:38
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178


#119735
Apr 02, 2015 10:36
Vote:
 

ok, found this fixed bug, Quan, how do get this patch without upgrading to 8.10? I can't not update now, i will just have new bugs on new features.

http://world.episerver.com/documentation/Release-Notes/ReleaseNote/?releaseNoteId=122752

#119738
Apr 02, 2015 11:17
Vote:
 

Unfortunately there'll be now way to apply the fix without upgrading to 8.10 - this is from core assembly so no workaround is available.

What's the issue which make you can't update now?

Regards.

/Q

#119743
Apr 02, 2015 11:51
Vote:
 

I have cms version 7.19.2, so i have to go up to version 8... and it contains a lot of breaking changes which i don't have the time to implement.

Or is it safe to just update EPiServer.Commerce.Core 8.10.0 Package with 7.19.2 you think?

#119747
Edited, Apr 02, 2015 12:17
Vote:
 

Unfortunately, no. It'll require at least CMS 8.0.

I think the biggest breaking change in CMS 8.0 was the language handling - did you try to upgrade to see how much work is needed? Generally we will recommend to upgrade to latest version as soon as possible.

Regards.

/Q

#119748
Apr 02, 2015 12:21
Vote:
 

Thank you Quan Mai. I don't have time to upgrade. I now need to implement my own confirmation email when order comes in. My opinion is that bugs like this should be integrated/patched into 8.7.1 where it belongs. I have contact with a Product Manager about this.

#119890
Apr 07, 2015 7:47
* 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.