We have two components (Component A & Component B). Component A has a link to Component B in a RTF field. When Component B is unpublished it causes Component A to be unpublished as well. We expected only the link to not resolve when Component B is unpublished. Is it possible to change this behavior? If yes, how?
-
2What you are seeing is the default behavior which takes into account that a Component Link can be used to embed a Component, but to my knowledge this behavior is only acting upon Publish and not UnPublish? What version of SDL Tridion are you referring to and are there any Event Systems or Custom Resolvers active?– Bart KoopmanCommented May 27, 2013 at 15:32
-
1I can confirm that this behaviour should only happen for Publish, and not for Unpublish. Do you have any custom resolvers configured in the TridionContentManager.config?– QuirijnCommented May 27, 2013 at 15:37
-
We are using SDL Tridion 2011 SP1 and there are no Custom Resolvers or Event System code that could cause this behavior. Although we have the "Add Unresolved Dependencies" TBB added to the CT. Would this TBB be causing this behavior?– Husain ZahidCommented May 28, 2013 at 13:50
-
What is the "Add Unresolved Dependencies" TBB? Doesn't seem to be an out-of-the-box one (and it wouldn't be executed when unpublishing anyway, just curious)– Nuno Linhares ♦Commented May 28, 2013 at 14:04
-
The "Add Unresolved Dependencies" TBB was developed by Jeremy and is available at forum.sdltridion.com/topic.asp?TOPIC_ID=5742, however upon checking the CT again I found that this TBB is not used in the CT. We also tried disabling all Event System Code, but the problem is still there. In the Unpublish dialog, clicking on the "Show Items to Publish/Unpublish" button shows the other component, which I think should not be showing.– Husain ZahidCommented May 29, 2013 at 8:52
2 Answers
Per my knowledge, this is the default behaviour that Tridion provides. You can write custom codes to achieve what you want. Below are few option in the order of their recommendations
Option 1: Write a Custom Resolver - You can get fair idea of custom resolver on the internet and one good link is here
Option 2: Tweaking through Event System on the Un-publishing event - Search Internet for samples
Option 3: Tweaking through Deployer Extension - Search internet for sample (Least recommended)
-
2I wouldn't offer option 3, first of all you can only strip out an item in a storage extension, but even so, you shouldn't do it that late in the process (after it has been rendered and deployed already) Commented May 27, 2013 at 15:24
-
Completely agree with you Bart, just listed here as an option Commented May 27, 2013 at 16:48
You can handle disabling Linking Propagation when un-publish. Check the following link to get an idea of the code you have to put in place in case you choose the Event System option (In your case you have to handle that in the un-publish events instead than in the publish events)
I don't want to publish any related components when publishing a component