Tridion publishing in debug mode

Publishing is the most critical process for Tridion users and when publishing fails (or takes too long) they become unhappy and the sysadmin has to explain why and fix it asap. Here is my Tridion tip for today: how to debug the publishing process.

Pre-requisites:

  • Admin access to machine where Publisher service runs
  • Nobody is publishing from that CMS

Steps for setting up the publisher in DEBUG mode:

  • Stop the Publisher windows service
  • Open command prompt (or Powershell)
  • Navigate to <TRIDION_HOME>\bin\ folder
  • Run 'TcmPublisher.exe -debug'

Now the publisher service is listening in DEBUG mode to the publish queue. Now you can publish the page that is causing issues and see what the publisher is doing under the hood and what is going wrong. 

Example response of publishing page

Below is an example result (modified a bit for readability):

10:33:29.5042 <12152> Retrieved queue message 73 from PublishQueue
10:33:29.5042 <12680> Working on queue message 73
10:33:29.7073 <12680> Extension initialized: CME System Privileges Extensions (Tridion.Web.UI.CME.TcmExtensions.SystemPr
ivileges)
10:33:29.7230 <12680> Extension initialized: CME Event System Extensions (Tridion.Web.UI.CME.TcmExtensions.EventHandlers
)
10:33:29.7542 <12680> Extension initialized: XPM - TCM Extensions (Tridion.SiteEdit.TcmExtensions.EventHandlers)
10:33:30.4376 <12680> Handling Publish Transaction [tcm:0-2-66560]
10:33:31.6916 <12680> Publishing item [tcm:1-41-64] from publication [tcm:0-1-1] to target [tcm:0-1-65537]
10:33:31.8836 <12680> Storage location: c:\Temp\tcm_0-2-66560.Content\
10:33:32.0197 <12680> Using resolver [Tridion.ContentManager.Publishing.Resolving.PageResolver]
10:33:32.1291 <12680> Resolving the pages [tcm:1-41-64] took 00:00:00.1135300
10:33:32.1447 <12680> Page tcm:1-41-64 resolved to 1 items. Resolving took: 00:00:00.1412808
10:33:32.1760 <12680> Rendering item [tcm:1-41-64] 'Test Page' with template [tcm:1-34-128] 'Default Page Template' in p
ublication target [tcm:0-1-65537] 'Staging'
10:33:32.9103 <12680> Referenced assemblies from the GAC:

10:33:32.9103 <12680> Referenced assemblies from the custom path:

10:33:32.9103 <12680> Source code: /* C# sourcecode removed for readability */
            
10:33:34.3745 <12680> Rendering of item [tcm:1-41-64] 'Test Page' with template [tcm:1-34-128] 'Default Page Template' i
n publication target [tcm:0-1-65537] 'Staging' took: 00:00:02.1851037
10:33:34.3865 <12680> Adding rendered item to the transport package: item [tcm:1-41-64] 'Test Page' with template [tcm:1
-34-128] 'Default Page Template' in publication target [tcm:0-1-65537] 'Staging'
10:33:34.3905 <12680> Using transport package handler: Tridion.ContentManager.Publishing.Transporting.DefaultPageHandler

10:33:34.3945 <12680> Adding [Page tcm:1-41-64] to the transport package.
10:33:34.3995 <12680> Writing file: c:\Temp\tcm_0-2-66560.Content\Pages\test.html
10:33:34.5353 <12680> Updating the publish transaction with the list of processed items
10:33:34.5509 <12680> Saving the transport package.
10:33:34.5978 <12680> Sending tranport package for transaction [tcm:0-2-66560] with deploy control [Commit] to transport
 service.
10:33:34.8514 <12680> Sending information to transport service took: 00:00:00.2454763.
10:33:34.8544 <12680> Transport service reported state [ReadyForTransport] for Publish Transaction [tcm:0-2-66560] with
response: <TransportSummary referenceId="tcm:0-2-66560" state="Ready for transport"><Processing><Context topic="Content
Delivery"><IsRollbackOnFailure>false</IsRollbackOnFailure></Context><Step href="simple" type="Prepare transport" state="
Ready for transport"><RemoteEndpoint connector="DiscoveryService" id="DgHAheAA2zLe19e5+Pe/tQ==" name="Discovery Service
Upload" state="Ready for transport" windowSize="0" /></Step><Step href="simple" type="Transporting" state="None"><Remote
Endpoint connector="DiscoveryService" id="DgHAheAA2zLe19e5+Pe/tQ==" name="Discovery Service Upload" state="None" windowS
ize="0" /></Step><Step href="simple" type="Deployment preparation" state="None"><RemoteEndpoint connector="DiscoveryServ
ice" id="DgHAheAA2zLe19e5+Pe/tQ==" name="Discovery Service Upload" state="None" windowSize="0" /></Step><Step href="simp
le" type="Deploying" state="None"><RemoteEndpoint connector="DiscoveryService" id="DgHAheAA2zLe19e5+Pe/tQ==" name="Disco
very Service Upload" state="None" windowSize="0" /></Step><Step href="simple" type="Deployment committing" state="None">
<RemoteEndpoint connector="DiscoveryService" id="DgHAheAA2zLe19e5+Pe/tQ==" name="Discovery Service Upload" state="None"
windowSize="0" /></Step></Processing></TransportSummary>
10:33:34.9102 <12680> Handling Publish Transaction [tcm:0-2-66560] took: 00:00:04.4792882
10:33:34.9102 <12680> Cache statistics: SimpleCache: 5 Regions, 5 Objects, 11 Hits, 2 Misses
10:33:34.9102 <12680>   Region 'Component': 0 Objects, 0 Hits, 0 Misses.
10:33:34.9102 <12680>   Region 'PublishTransaction': 3 Objects, 6 Hits, 1 Misses.
10:33:34.9102 <12680>   Region 'TargetType': 1 Objects, 4 Hits, 0 Misses.
10:33:34.9102 <12680>   Region 'PublicationTarget': 1 Objects, 1 Hits, 0 Misses.
10:33:34.9258 <12680>   Region 'Tdse': 0 Objects, 0 Hits, 1 Misses.
10:33:35.0352 <12152> Deleting queue message: 73 from PublishQueue.
10:33:35.4883 <6132> Transport service response: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
/* XML response is removed for readability */
10:33:35.5234 <6132> Receiving deployment feedback for publish transaction [tcm:0-2-66560] with status: WaitingForDeploy
ment
10:33:39.7672 <6132> Transport service response: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
/* XML response is removed for readability */

10:33:39.7922 <6132> Receiving deployment feedback for publish transaction [tcm:0-2-66560] with status: Success

What good to know is that this also works for other TCM services as well. After you finished your investigation, don't forget to start the service again.

Tridion Content Types for XPM explained

In this article, I want to explain how to create, configure and use Tridion Content Types with Experience Manager (XPM).

Background

Lots of clients want to have Experience Manager (XPM) enabled for their sites to have inline editing capabilities in the staging environment. For moderating existing content this is working fine. For new content, the Content Manager often falls back to the 'classic' Content Management Explorer (CME). Their reason given is that XPM does not add value. This can be improved by defining a lesser known feature: Content Types.

What are Content Types?

Content Types are pre-set definitions for adding a new component presentation to your page. Within the definition you can define content creation settings:

  • Component prototype (which is copied to bootstrap your new component)
  • Auto-generated component title (optional)
  • Default storage location (restricted or optional)
  • Default component template
  • Insert location (top or bottom of the page)

Content Types can be used to create and insert new content within XPM. The content types are presented on the left-hand side panel.

How to create a Content Type?

Content Types are managed on publication level. When opening the properties of a publication there is a tab:

The title and description fields are shown in XPM for the content editor to get a notion of the purpose.

Create Content Type mapping to Page Template(s)

After creating a new Content Type you do not see it in XPM directly. First, you need to enable for 1 or more Page Templates. This can be done via Tridion Settings page - Inline Editing - Content Type mappings - [your publication]. When selecting a page template you should see something like this:

You can see that I unchecked 'Inherit settings from Parent' since in my case I only want to enable my new 'Campaign Story' content type on campaign site publication level. If you want to create a content type to used in every publication, you have to create it on the highest possible publication. And then create the PT mapping there too to inherit it to lower publications. 

Happy XPM-ing :-)

Upgrading to SDL Web 8.5 can break your DD4T JMS decaching

Below a story about non-working decaching after upgrading to SDL Web 8.5 CMS.

Project setup

The project I work on has this environment configuration:

  • SDL Web 8 CMS (with update SP1 and Cache Channel Service)
  • DD4T 2.1 based .NET web application
  • ApacheMQ as JMS solution
  • We use DD4T.Caching.ApacheMQ NuGet package
  • Hosted in Azure cloud

Given this setup, everything is configured to flush the Application cache when a Content Manager publishes a Page, Dynamic Component Presentation or Taxonomy from the CMS. This works really well and we achieve the two most important goals: High-performance websites + No outdated content.

Upgrade to Web 8.5 problem

But then we decided to upgrade to SDL Web 8.5 (with a new server). The upgrade process itself is not as painful as it was in the past, but we had an issue: de-caching mechanism did not work anymore. We did the most obvious checks:

  • Check config settings of microservices
  • Firewall settings (ports open?)
  • MQ dashboard (publishers, subscribers, and messages)
  • Check log files for exceptions
  • Review the Topology Management config (java -jar .\discovery-registration.jar read)

Mysteriously, everything was fine. After some WebApp debugging sessions I found the issue. The JMS messages were changed and the TCM URI is now prefixed with '1:'. Maybe SDL decided to include the CacheEventTypeId? Examples:

  • SDL Web 8 sends 17:3565 for pages.
  • SDL Web 8.5 sends 1:17:3565 for pages.
  • SDL Web 8 sends 17:52916:154 for DCPs.
  • SDL Web 8.5 sends 1:17:52916:154 for DCPs

RCA and solving the issue

This causes a lookup issue when looking for depending cache items to flush within the TridionBackedCacheAgent. The agent stores pages in cache with 17:3565 and CCS tries to flush the cache with 1:17:3565. Since we have a custom implementation of the CacheAgent (for either reasons) we could fix it easily by using this code fragment in the CacheAgent:

private Regex RemoveFirstElemWhenWeb85 = new Regex("^(1:)(.*)");

private string GetDependencyCacheKey(string tcmUri)
{
            return "Dependencies:" + this.RemoveFirstElemWhenWeb85.Replace(tcmUri, "$2");
}

This code backward compatible with older version of Web/Tridion as long as you do not have a publication with the ID of 1 :-)

 

SDL Connect 2017 - Tridion Sites and Tridion Docs

The SDL Connect 2017 conference was held in San Jose, California. Connect is a yearly user and partner conference where language and CMS technology provider SDL announced their strategy and roadmap for the coming year(s). Below some notes from the sessions that I attended.
 
SDL Tridion DX
One of the most visible changes is bringing back the Tridion brand. At SDL Connect they announced the new SDL Tridion DX digital experience product. The product is actually a suite that combines web content management (SDL Tridion Sites) and DITA-based structured content management (SDL Tridion Docs).
 
 
Tridion DX contains a unified experience layer with the support of Tridion Open Content API targeted to any digital touchpoints: mobile, desktop, watches, bots, in-store displays, etc. With these APIs, it is possible to create content mash-ups blending marketing content, commerce content and product information. All this information can be personalized by leveraging AI and Machine Learning capabilities.
 
 
Tridion DX will be launched mid-2018 and will replace their 2 current content products SDL Web and SDL Knowledge Center. Until that date there can still be some confusion, since marketing will only use Tridion DX, but the underlying product names stay a bit longer: SDL Web 8.5 and SDL Knowledge Center 13.
 
SDL Knowledge Center and Tridion Docs
Tridion Docs will be the new name of SDL Knowledge Center (KC) by mid-2018. Until then the product will still be named KC version 13. Knowledge center is a product which enables companies to manage technical content (i.e. manuals) in a structured way. The product supports the industry standard Darwin Information Typing Architecture (DITA), which is an XML based structure to create, produce and publish information. Publishing targets are typically documentation portals, download centers, and support sites.
 
The end of October 2017 release of KC 13 has some major improvements:
  • Support for new delivery stack (DXA) shared with SDL Web with better touch points experiences
  • Upgrading is simplified by Powershell script support, automation, and centralized configuration
  • Enhanced translation workflow
  • Enhanced productivity by UI improvements
 
By using DXA in the delivery stack also new benefits are introduced:
  • Improved site navigation options (more flexible, can be based on taxonomy)
  • Multilanguage support for the UI
  • Personalization and filtering support
  • Search is now powered by Elastic Search
 
SDL Tridion Sites 9
Tridion Sites is the content management system that is formerly known as SDL Web 9. It is mostly used for managing multi-language/branded content for marketing and commerce sites. By combining both Sites and Docs in Tridion DX the content silo boundaries are removed and content managers have a more unified experience when working with content. For the customers of the content, this change will also be noticeable since the pre-sales marketing content is more aligned with the post-sales product content.
 
Experience regions can be used to partition a page. The regions are user-defined and customizable per page template. A region can be used to position components in a certain area of a page. Regions can also be restricted to be only used for e-commerce integrations.
 
 
Other announced features include:
  • Image editing support (basic manipulations like cropping, rotating and scaling). The manipulation is stored in the metadata and source image is untouched.
  • Tridion Open Content API for creating content mashups.
  • Integration Marketecture - integration with external CRM/Marketing/E-commerce systems via Accelerators and Connectors
  • Improved cloud support
  • Prescriptive Personalization (old SmartTarget/Fredhopper product) based on:
    • Web attributes (i.e. IP based geolocation, company, time of day or referrer source)
    • Database attributes (i.e. CRM or marketing databases)
    • Behaviour-driven (user actions on touchpoints)
  • Adaptive Personalization by using real-time AI and Machine Learning technology. See picture below.
West Coast meetup - preview of new CME UX design
During the West Coast community meetup, SDL showed that they are very busy working on a new UX design for their Content Management Explorer. The first UX drafts are very promising and radically changing the way we work with the CME. Also, they emphasized the goal of open API based platform with connectors for extensibility. The downside is that we need to wait until Tridion DX 10 is announced to see what they can deliver since it's quite a big step.