Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Craig100 1136 posts 2523 karma points c-trib
    Jun 10, 2016 @ 09:32
    Craig100
    0

    XDT Transform files for UaaS

    Hi,

    Have installed SEOChecker on UaaS and in general it works. However, there are issues with changes to Live config generating commits that get passed back to Staging. This means in my particular case that we force a www prefix on Live which we really don't want on Staging. There is a fix however and it's to use XML Document Transformation files (https://our.umbraco.org/documentation/Umbraco-as-a-Service/Set-Up/Config-Transforms/). While I've successfully created and deployed xdt files for UmbracoSettings to cope with 404 nodeId's being different in each environment, I'm struggling with the SEOChecker.config ones. The AppHarbor tool at https://webconfigtransformationtester.apphb.com/ doesn't seem to like the original document or my syntax is out. It's only transforming the nodeId's and not any of the other tag attributes. I've tried installing the Slow Cheetah extension to VS2015 but that doesn't even show up in VS anywhere.

    I was wondering if anyone has any tooling advice for this. I'm so close to getting SEOChecker working on UaaS it's a pity to have to give up now.

    My xdt file is like this:-

    <?xml version="1.0"?>
    <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    
      <trigger triggerOnPublish="true" xdt:Transform="Replace" />
      <xmlSiteMap enabled="false" excludeUmbracoNaviHide="false" xdt:Transform="Replace" />
      <urlRewrite enabled="true" forcewwwUrls="false" useTrailingSlashProperty="true" xdt:Transform="Replace" />
      <redirectConfig storeDomain="false" storeQueryString="false" forwardQuerystring="true" redirectWhenNodeExists="false" xdt:Transform="Replace" />
      <notFoundConfig enabled="true" xdt:Transform="Replace" />
      <robotsTxt enabled="true" xdt:Transform="Replace" />
    
      <rootNodeSettings>
        <rootNode>
          <nodeId xdt:Locator="XPath(//nodeId[text()='1352'])" xdt:Transform="Replace">1334</nodeId>
        </rootNode>
        <rootNode>
          <nodeId xdt:Locator="XPath(//nodeId[text()='2324'])" xdt:Transform="Replace">2306</nodeId>
        </rootNode>
        <rootNode>
          <nodeId xdt:Locator="XPath(//nodeId[text()='2975'])" xdt:Transform="Replace">3954</nodeId>
        </rootNode>
        <rootNode>
          <nodeId xdt:Locator="XPath(//nodeId[text()='2325'])" xdt:Transform="Replace">4569</nodeId>
        </rootNode>
        <rootNode>
          <nodeId xdt:Locator="XPath(//nodeId[text()='4206'])" xdt:Transform="Replace">2958</nodeId>
        </rootNode>
        <rootNode>
          <nodeId xdt:Locator="XPath(//nodeId[text()='4712'])" xdt:Transform="Replace">3464</nodeId>
        </rootNode>
        <rootNode>
          <nodeId xdt:Locator="XPath(//nodeId[text()='5202'])" xdt:Transform="Replace">5184</nodeId>
        </rootNode>    
      </rootNodeSettings>
    
      <showTemplateErrorsForNonAdmins xdt:Locator="XPath(//showTemplateErrorsForNonAdmins[text()='true'])" xdt:Transform="Replace">false</showTemplateErrorsForNonAdmins>
    
    </configuration>
    

    Only the items in the rootNodeSettings section are being correctly transformed. The rest seems to be ignored.

    Note: the above doesn't show the extra tag the AppHarbor tool requires on purpose: <xdt:Import assembly="AppHarbor.TransformTester" namespace="AppHarbor.TransformTester.Transforms"/>

    Any advice appreciated.

    Thanks,

    Craig

Please Sign in or register to post replies

Write your reply to:

Draft