Problems when mixing Selective Deployment with Quick Deployment

Today I analyzed an interesting problem related to mixing Selective Deployment and Quick Deployment.

Background Info

I explained the concepts of Quick Deployment in the following article: Content Deployment – The complete Guide – Part 5 – Quick Deployment

To summarize: Each enabled Quick Deployment job that originates in a specific site collection is referenced in the quickdeployjobs property in the property bag of the root site of the site collection. This is necessary as it is not guaranteed that the user performing the quick deploy or the application pool account has rights to enumerate the configured quick deployment jobs in the farm.

“Quick deploying” an item will create a reference for each quick deployment job to the item in the “Quick Deploy Items” list which also resides in the root site of the site collection. That means if you have 2 quick deployment jobs originating from the site collection you will have 2 list items in the Quick Deploy Items list – one for each timer job.

Why is this necessary?

Because the quick deployment jobs run with different schedules and each job reads the items to be deployed from Quick Deploy Items list and removes the deployed items from the list afterwards. To ensure that all jobs can pick up the items to be deployed it is necessary to create one item for each job which includes a reference to the item to be deployed and an identification for the quick deployment job that should pick it up.

The problematic scenario

Assume the following site structure:

Only Document Center and Reports should be deployed to the target – together with the Root site of course.

So the content deployment job is configured for selective deployment to only deploy the Root, Document Center and Reports

In addition Quick deployment has been enabled on the path to ensure that important information can be deployed quickly to the target.

Everything goes fine for a while, till a user decides to use the Quick Deploy option for an item in the News (or Search or Reports) site. From now on all future quick deploy jobs for the specific path will fail.

What is causing the problem?

The answer is simple: when the quick deployment job runs it tries to deploy all items which have been configured for quick deployment to the target site collection.

But the import cannot be completed as the parents for the deployed page (the News Site and its Pages library) never got deployed to the target.

This is very similar to the problem outlined in the Possible Problems when selecting incorrect content section of Content Deployment – The complete Guide – Part 5 – Quick Deployment:

Quick deployment only deploys publishing pages and resources bound to these pages. Sites and lists are not deployed through quick deployment. Due to this, all target folders and libraries for all deployed items must already exist on the target farm. For example, consider the scenario where a new picture library has been created and a picture from this picture library has been bound to a field in a publishing page that needs to be quick deployed. Quick deployment will fail if the picture library has not been previously deployed to the target site collection. Due to this limitation the group of users allowed to do quick deploy should be limited as they have to know exactly about this limitation and they also have to be aware about which content has already been deployed before to the target and which has not been deployed. Otherwise an author quick deploying a page which references a resource outside the already deployed libraries can cause an important press release which has to go live asap to fail to deploy as the quick deploy job fails.

But the major problem here is that this problem cannot be resolved by running an incremental deployment as with the scenario where a page got deployed earlier than it’s library.

How can this specific problem be resolved?

In order to resolve this it would be necessary to remove the items which have been incorrectly selected from the Quick Deploy Items list – either by script or manually by browsing to the Quick Deploy List which can be found using the following Url: http://url-to-site-collection/Quick%20Deploy%20Items

How can this problem be avoided?

The only practical way to avoid this problem is to disable Quick Deployment if Selective Deployment jobs are used.

If Quick Deployment is required it would be necessary to separate the hierarchy in a way that the content that should support quick deployment resides in a different site collection than the content which should not support Quick Deployment.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.