When you publish an item in Tridion, all items linking to this item are also published, on 2 conditions:
– The linking item is already published
– The checkbox ‘If other published Components link to a Component you are publishing, publish or republish those Components’ is checked (this is the default)
I don’t know if this principle has an official name, but I call it ‘reverse link propagation’, because it follows links backwards and propagates the publishing action to the linking items.
Reverse link propagation is not new, in fact it may have been around in Tridion since day 1. But today I thought I’d try to find out how far this ‘reverse link propagation’ really goes. I created a chain of 10 articles:
- Article A (linking to B)
- Article B (linking to C)
- Article C (linking to D)
- Article D (linking to E)
- Article E (linking to F)
- Article F (linking to G)
- Article G (linking to H)
- Article H (linking to I)
- Article I (linking to J)
- Article J
I then started to test. First, I published all articles, because – as mentioned before – the logic only applies to items that are already published.
By the way, the easiest way to find out which items will be published is to use the Show items to publish button in the publish popup screen:
In my test environment, publishing article J gave the following result:
As the picture shows, I found that the whole chain of 9 ‘linker’ articles was published along when I published article J only. Apparently there is no maximum or if there is one, it is higher than 10.
Another thing I found was that the chain is not broken when an article is unpublished. Unpublished articles are merely skipped. So if I unpublish articles G, H and I, and I try to publish article J, Tridion will still publish articles A through F.
It seems to me that this is a bit excessive. I understand the purpose of reverse link propagation: article A links to B so when you show article A on a site, there is a good chance it displays some of the content of B as well. Therefore, it is best to publish A when you change and publish B. But 10 levels deep? How often does it happen that you see that many levels of content on a single page?
Reducing the number of levels
In some cases, the effect of reverse link propagation is that publishing becomes very slow. There could be dozens or even hundreds of components in a single transaction. Luckily, there are a few ways to fix this:
- When you publish an item (like a component), go to the Advanced tab in the publish popup and clear the checkbox labeled as ‘If other published Components link to a Component you are publishing, publish or republish those Components’. Every Tridion user needs to do this themselves.
- Use the event system to automate this for you. Just write an event that sets the property IncludeComponentLinks on the RenderInstructions object to false whenever a publish transaction is created.
- Create your own custom resolver to remove all or some of the items that Tridion has put in the list. Or you can even replace Tridion’s out of the box custom resolver entirely. But don’t underestimate how much logic SDL has put into their resolvers!
More about custom resolvers some other time.