Kentico 9持续集成错误

时间:2016-12-19 13:56:31

标签: kentico

我正在研究Kentico电子商务项目,为了使用持续集成功能,它已从8.2.48版本移至9.0.50,但现在出现了错误:

Message: Serialization of object type @Product tax class@ (ECommerce.SKUTaxClass) failed for object @551, 2@ ([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 CMS.ContinuousIntegration.Internal.FileSystemStoreAllJob.@@c__DisplayClass6.@StoreAllObjectTypeObjects@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 admin ui设置为全局,我不明白为什么CI不能按原样处理它们?

P.S。我是Kentico的新手,真的需要你的帮助(:

2 个答案:

答案 0 :(得分:0)

最后一条消息说明:

Message: Missing site ID value for object AAA.

因此,请尝试为您的网站提供该选项。

答案 1 :(得分:0)

简而言之,将此类(或直接使用附加文件)放在项目中的(旧)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,电子商务高级支持专家