DXA 1.2 and SDL Web 8

With the release of SDL Web 8, now everybody of course wants to give it a try, and what would be a better opportunity than to use DXA for that right? Unfortunately when you look in the release notes of DXA version 1.2 (the current and latest release at the time of writing this article) you notice it is only compatible with SDL Tridion 2013 SP1 HR1 (which makes sense because SDL Web 8 wasn't available at the time of release of DXA 1.2). You might have also heard that we are planning to release DXA 1.3 (a version with support for both SDL Tridion 2013 SP1 HR1 and SDL Web 8) by the end of January 2016. But you of course don't want to wait that long, and want to play with Web 8 now...

Okay let me give you a few hints and tips that you can use to play then. This is all possible because SDL Web 8 was made fully backards compatible, but there are also a few things you will have to accept that will not fully work (since Web 8 also comes with new features, and those are simply not available in the DXA 1.2 code yet).

So it all starts with getting your hands on SDL Web 8 and installing it according to the documentation. The next step will be that you download DXA 1.2 and install that on your new Web 8 system. The CMS install should be straight forward (note that at the time of writing this article, SDL Web 8 does not have a Content Porter addon available yet, but we see the compatibility in action when we simply use the 2013 ImportExport API from the DXA install scripts), and then you have Publications with content. Your next step will be making a decision, do you want to go for legacy publishing (using a Publication Target), or do you want to use the new way, then you will have to setup the Topology Manager. Please note that DXA determines if it is being published to a Staging site, by looking at the XPM application data of your Publication Target, so when using a Business process Type to publish, it will automatically assume you are publishing to live and XPM will not be enabled (that is one of the things which we will add support for in DXA 1.3).

So when you have all of this setup and you can successfully publish the DXA example website to a broker database, then it is time to start looking at the web application. Now you can simply run the DXA 1.2 web application installer as documented, but that comes with the SDL tridion 2013 SP1 HR1 jars and DLLs, so running it that way would be cheating (since then we have a new CMS and broker database, connected via an older version of Content Delivery. What we want to do is get it working completely on SDL Web 8 of course. I'm using DXA 1.2 NET in this example.

So I will run the following command:

& '.\Install Web-Application.ps1' -deployType Live -distDestination C:\inetpub\wwwroot\dxa12 -webName DXA12 -sitePort 888 -sitePublicationId 8 

And I will just fill in dummy values for the questions I get about the database server (since I don't care about the cd_storage_conf.xml which is generated by the installer, as I plan to use CDaaS (Content Delivery as a service) in Web 8. Great that works now I have a website installed, but don't check if it works right away (remember, bogus values for the database), instead lets start changing it to make it work.

Okay because we will be using CDaaS, the first thing I can do is delete the bin\lib folder from this website, that is 2013 SP1 HR1 libs anyways and I don't need any java libs in my DXA Web 8 website anymore! So let me list you all the steps to do:

  1. delete bin\lib folder
  2. delete all DLLs starting with Tridion.ContentDelivery from your website bin folder (4 in total)
  3. delete netrtsn.dll & xmogrt.dll from your website bin folder
  4. copy everything from [SDLWeb8]\Content Delivery\roles\api\rest\dotNet\bin into your website bin folder
  5. delete the following configuration files from your website bin\config folder: 
    • cd_ambient_conf.xml
    • cd_link_conf.xml
    • cd_storage_conf.xml
    • cd_wai_conf.xml
    • cwd_engine_cartridge_conf.xml
    • cwd_engine_conf.xml
    • cwd_engine_vocabulary_conf.xml
    • ehcache_context_image.xml
    • jvm.xml
    • logback.xml
  6. copy the cd_ambient_conf.xml file from [SDLWeb8]\Content Delivery\roles\api\rest\config into your website bin\config folder
  7. add the following to your website web.config file under appSettings:
        <!-- SDL Web 8 CDaaS configuration settings: -->
        <add key="discovery-service-uri" value="http://localhost:8082/discovery.svc" />
        <add key="log-level" value="INFO" />
        <add key="log-rolling" value="true" />
        <add key="log-max-log-size" value="50000" />
        <add key="log-output" value="C:\Temp\logs\dxa12_cd_client.log" />
        <!-- NOTE: set "service-caching" to "false" for XPM Session Preview (Staging) -->
        <add key="service-caching" value="false" />
        <add key="service-caching-expiration" value="60" />
        <add key="oauth-enabled" value="false" />
        <add key="oauth-client-id" value="cduser" />
        <add key="oauth-client-secret" value="password" />
  8. add the following to your website web.config file under assemblyBinding:
          <!-- redirections for DD4T & DXA to SDL Web 8 Content Delivery -->
          <dependentAssembly>
            <assemblyIdentity name="Tridion.ContentDelivery.AmbientData" publicKeyToken="ddfc895746e5ee6b" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-7.2.0.0" newVersion="8.1.0.1239" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Tridion.ContentDelivery" publicKeyToken="ddfc895746e5ee6b" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-7.2.0.0" newVersion="8.1.0.1239" />
          </dependentAssembly>

Now you have to make sure that the values you added in your web.config make sense of course, so point them to your discovery service endpoint URL and set the correct oauth credentials when appropriate.

This should do the trick, time to appreciate your DXA 1.2 website on SDL Web 8 (you are a hard core hacker now ;o). You might notice a few issues with your site still, as mentioned, while Web 8 is backwards compatible, there are also a few things which changed and that is part of what you will notice. Among these are the Context Engine integration (resizing of DXA images), this is moved to a separate service, for which we will add support in DXA 1.3. Please also note that at the time of writing the addons for SDL Web 8 are not released, so don't expect things like the DXA SmartTarget module to work, since there is no Experience Optimization capability in SDL Web 8 yet (will be there soon).

When you want to use the in-process version of Web 8 Content Delivery, the steps will be a bit different, you will have to configure more on the web application side (like the cd_storage) and use different DLLs. Also a similar story for DXA Java, you have to follow a different procedure of course.

I hope this article gave you some new insights and I wish you a pleasant holiday season, with lots of fun with DXA and SDL Web 8.