Why is SDL Tridion 2011 Custom Resolver called twice when publishing a component?

I have a Custom Resolver that applies to elements of type Publication, StructureGroup, Page and Component. The code works as expected, but I don't understand exactly when this code is called. My Tridion.ContentManager.config contains the following snippet:

<resolving>
    <mappings>
        <clear/>
        <add itemType="Tridion.ContentManager.CommunicationManagement.Page">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.PageResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
                <add type="UrbanCherry.Net.SDLTridion.CustomResolvers.DynamicBinaryLinkResolver" assembly="UrbanCherry.Net.SDLTridion.CustomResolvers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7729a00ff9574fb"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.CommunicationManagement.PageTemplate">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.PageTemplateResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.ContentManagement.Component">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.ComponentResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
                <add type="UrbanCherry.Net.SDLTridion.CustomResolvers.DynamicBinaryLinkResolver" assembly="UrbanCherry.Net.SDLTridion.CustomResolvers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7729a00ff9574fb"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.CommunicationManagement.ComponentTemplate">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.ComponentTemplateResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.CommunicationManagement.Publication">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.PublicationResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
                <add type="UrbanCherry.Net.SDLTridion.CustomResolvers.DynamicBinaryLinkResolver" assembly="UrbanCherry.Net.SDLTridion.CustomResolvers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7729a00ff9574fb"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.CommunicationManagement.StructureGroup">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.StructureGroupResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
                <add type="UrbanCherry.Net.SDLTridion.CustomResolvers.DynamicBinaryLinkResolver" assembly="UrbanCherry.Net.SDLTridion.CustomResolvers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e7729a00ff9574fb"/>
            </resolvers>
        </add>
        <add itemType="Tridion.ContentManager.ContentManagement.Category">
            <resolvers>
                <add type="Tridion.ContentManager.Publishing.Resolving.CategoryResolver" assembly="Tridion.ContentManager.Publishing, Version=6.1.0.996, Culture=neutral, PublicKeyToken=360aac4d3354074b"/>
            </resolvers>
        </add> 
    </mappings>
</resolving>

      

When I publish a post, StructureGroup or page, my custom Resolver gets one time (which is what I expected), however, when I publish a component (whose schema is linked to a single component template that creates a dynamic view of the component) the custom resolver gets called twice.

Is this the expected behavior? If not, can anyone suggest why my resolver is being called a second time?

+3


source to share


2 answers


The Resolver is called once for the component and once for each component template associated with the component diagram. The addition of an additional CT for this scheme increased the number of calls to three.



It is unclear if this is a bug or by design, but explains the number of calls. Interesting custom resolver is only called once when Un-Publishing the Component

+5


source


I noticed that for each publish target, a custom resolver is called which is "in scope" for the current publish action.



+1


source







All Articles