Skip to content
The Bits That Byte
  • About
May 31, 2019 / Sitecore

Marketing Definitions error deploying the definitions in Sitecore PaaS 9.0.2 and 9.1.0

If you are running Sitecore PaaS for versions 9.0.2 (Sitecore 9.0 Update 2) or 9.1.0 (Sitecore 9.1 Initial Release), you may run into the following error when deploying Marketing Definitions:

There was an error deploying the definitions. Consult the Sitecore logs for more information.

Assuming you don’t have certificate issues and can successfully populate and rebuild the Solr indexes, this has been noted by Sitecore as a bug.

They have provided a hotfix, but you will need to contact Sitecore Support to obtain it, as your environment could have other issues at play that would not be appropriate for this patch.

What is Causing This Error?

Definitions are in fact getting deployed, but the deployment process runs longer than Azure expects and requests are aborted (the deployment completes in the background) so the UI displays as an error when deploying the definitions.

How Does the Patch Fix This?

The patch includes a fresh .dll for the bin and a replacement DeployMarketingDefinitions.js file.

Per deep analysis by my colleague Grant Killian, the primay change is one instruction in the .js that engages the Sitecore API (C# instead of JavaScript) so the patched operation is performed on a different MVC Controller.

Original:

  jQuery.ajax({
                    type: "POST",
                    url: "/api/sitecore/DeployMarketingDefinitions/DeployDefinitions",
                    data: { …

Patched:

Patched
         jQuery.ajax({
                    type: "POST",
                    url: "/api/sitecore/SupportDeployMarketingDefinitions/DeployDefinitions",
                    data: { …

Note the differences in the MVC Controller of the .dll for the received call.

Original:

        [HttpPost, ActionName("DeployDefinitions")]
        public virtual ActionResult DeployDefinitions(string definitionTypes, bool publishTaxonomies)
        {
            if (Tracker.IsActive && !Tracker.Current.CurrentPage.IsCancelled)
            {
                Tracker.Current.CurrentPage.Cancel();
            }
            string[] strArray = JsonConvert.DeserializeObject<string[]>(definitionTypes);
            this.DeployDefinitionTypes(strArray);
            string name = string.Empty;
            if (publishTaxonomies)
            {
                name = this.StartTaxonomiesDeploymentJob().Name;
            }
            return base.Json(new
            {
                success = true,
                jobName = name
            }, JsonRequestBehavior.AllowGet);
        }

Patched:

    [HttpPost, ActionName("DeployDefinitions")]
    public virtual ActionResult DeployDefinitions(string definitionTypes, bool publishTaxonomies)
    {
        if (Tracker.IsActive && !Tracker.Current.CurrentPage.IsCancelled)
        {
            Tracker.Current.CurrentPage.Cancel();
        }
        string name = Client.Site.Name;
        string str2 = this.StartDefinitionsDeploymentJob(JsonConvert.DeserializeObject<string[]>(definitionTypes), publishTaxonomies, name).Name;
        return base.Json(new { 
            success = true,
            jobName = str2
        }, JsonRequestBehavior.AllowGet);
    }

Post navigation

Previous Post:

Do You Need Microsoft Machine Learning to Use Cortex in Sitecore 9.1?

Next Post:

Sitcore 9 SolrCloud Custom Index/Alias Error

2 Commments

  1. Raja says:
    January 8, 2020 at 1:23 pm

    Thank you for this article, this is really helpful as we are also having similar issue. We contacted support and they are not aware of any support patch for this. Can you please provide provide public reference number or case number or anything that helps them look for it?

    Thank you.

    Reply
    1. Kelly says:
      January 10, 2020 at 4:57 pm

      That is surprising. Here is the link: https://kb.sitecore.net/articles/322554

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sitecore Technology MVP

Categories

  • AngularJS
  • Azure
  • CSS3
  • HTML5
  • Hyper-V
  • JavaScript
  • jQuery
  • OneDrive
  • PowerShell
  • Responsive Web Design
  • Search
  • SEO
  • SharePoint
  • Sitecore
  • SQL 2008 R2
  • SQL 2012
  • Tech Review
  • Tech Toy
  • Technical Resources
  • Uncategorized
  • Visual Studio
  • Web Content Management
  • Windows 8
  • Windows 8 App
  • Windows App
  • Windows Server 2008 R2
  • Workflow

Sponsored Links

Recent Posts

  • Autofail: A Big Azure Autoscale Limitation and What To Do
  • Got Fixes? A Sitecore Troubleshooters Guide to Sitecore Hotfixes
  • Sitecore 10 Application Roles, Storage Roles, and Indexes
  • Don’t Copy Sitecore Databases Across Environments, Sync Instead
  • Hey Sitecore PaaS! Where are My Modules?

Blogroll

  • Colins Sitecore Tech Blog
  • Sitecore Architecture – Grant's Sitecore Rants
January 2021
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031
« Dec    
© 2021 thebitsthatbyte.com - Powered by SimplyNews