Kentico 9持续集成错误

Pmazaleu

我正在从事Kentico电子商务项目,出于使用持续集成功能的目的,该项目已从8.2.48版本移至9.0.50,但是现在出现错误:

Message: Serialization of object type @Product tax [email protected] (ECommerce.SKUTaxClass) failed for object @551, [email protected] ([Unknown]: 0). See inner exception for further details.

    Exception type: CMS.ContinuousIntegration.ObjectTypeSerializationException
    Stack Trace: 
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.StoreSingleObjectTypeObject(FileSystemStoreJob storeJob, ObjectTypeInfo typeInfo, String objectType, BaseInfo info, Int32 counter, Int32 total)
    at [email protected]@[email protected]@b__3(BaseInfo info)
    at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`2 action)
    at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`1 action)
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.StoreAllObjectTypeObjects(String objectType, Int32 counter, Int32 total)
    at CMS.ContinuousIntegration.Internal.AbstractFileSystemJob.CancellableForEach[T](CancellationToken cancellationToken, IEnumerable`1 collection, Action`2 action)
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.StoreObjects()
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.RunInternal(CancellationToken cancellationToken)
    at CMS.ContinuousIntegration.Internal.AbstractFileSystemAllJob.Run(Nullable`1 cancellationToken)

    Message: Serialization of the object CMS.Ecommerce.SKUTaxClassInfo (ecommerce.skutaxclass) has failed.

    Exception type: CMS.ContinuousIntegration.ObjectSerializationException
    Stack Trace: 
    at CMS.ContinuousIntegration.Internal.AbstractSingleObjectJob.Run(BaseInfo baseInfo)
    at CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.StoreSingleObjectTypeObject(FileSystemStoreJob storeJob, ObjectTypeInfo typeInfo, String objectType, BaseInfo info, Int32 counter, Int32 total)

    Message: Missing site ID value for object AAA. Object type does not support global objects.

    Exception type: System.Exception
    Stack Trace: 
    at CMS.DataEngine.TranslationReferenceLoader.LoadFromInfoObject(BaseInfo info)
    at CMS.ContinuousIntegration.FileSystemBindingsProcessor.CreateParentElement(XmlNode rootElement, BaseInfo parent)
    at CMS.ContinuousIntegration.FileSystemBindingsProcessor.PrepareNewDocument(String relativePath, BaseInfo parent, String rootElementName)
    at CMS.ContinuousIntegration.CachedFileSystemBindingsProcessor.PrepareNewDocument(String relativePath, BaseInfo parent, String rootElementName)
    at CMS.ContinuousIntegration.FileSystemBindingsProcessor.AppendBindingInternal(BaseInfo binding, String relativePath)
    at CMS.ContinuousIntegration.CachedFileSystemBindingsProcessor.AppendBindingInternal(BaseInfo binding, String relativePath)
    at CMS.ContinuousIntegration.Internal.FileSystemStoreJob.StoreBaseInfo(BaseInfo baseInfo, String relativePath)
    at CMS.ContinuousIntegration.Internal.AbstractSingleObjectJob.Run(BaseInfo baseInfo)

对象AAA是产品的“产品”选项,该产品设置为(全局)并在2个站点中使用。因此,这些对象已由Kentico管理员ui设置为全局对象,我不明白为什么CI无法按原样处理它们?

ps我是Kentico的新手,真的需要您的帮助(:

Pmazaleu

简而言之,请将此类(或直接使用附件)放置在项目的(Old)App_Code文件夹中的任何位置。该应用程序将重新启动(在更改代码文件时),并且CI应能正常工作。

using CMS.Base;
using CMS.Ecommerce; 
using CMS.DataEngine; 
[SystemObjectCustomizationLoader] public partial class CMSModuleLoader {
        /// <summary>
        /// Custom attribute class for the CMSModuleLoader.
        /// </summary>
        private class SystemObjectCustomizationLoaderAttribute : CMSLoaderAttribute
        {
            /// <summary>
            /// Called automatically when the application starts.
            /// </summary>
            public override void Init()
            {
                // Allows global objects support for product options and variants. Fixes issue with CI serialization of global products with options or global variants having global taxes. 
                SKUInfo.TYPEINFOOPTIONSKU.SupportsGlobalObjects = true;
                SKUInfo.TYPEINFOVARIANT.SupportsGlobalObjects = true;
            }
        } }

(与)电子商务高级支持专家Zdenek Cetkovsky

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章