Sitecore Items Publishing Order

Xing Liu • 9/8/2015

When you publish Sitecore content tree items, you need to make sure that you publish the items in a certain order.  Here is a scenario that you might encounter when you publish items.  In the example below, a content author created the following structure in the master database, in which News items (News-Item-1 and News-Item-2) were under a parent folder called News-Items:

News Page

After the content author finished editing News-Item-1, he (or she) published only the current item to the web database.  However, the parent item (News-Item) was not in the web database yet, which resulted in an empty News-Items folder being created, as shown below.

News Page Web Database

This is actually expected behavior in Sitecore. Below is information about publishing items with a parent node, as mentioned by Sitecore:

  • When publishing an item to the target database where the parent doesn’t exist, the item will be skipped, because Sitecore cannot publish item to non-existing item.
  • When you publish the item from the parent level, you should publish the item with its subitems.

This is relevant especially when the user is using the Page Editor, as it is easy for the user to publish the child item before publishing the parent.  Therefore, it is recommended to publish parent items before publishing child items.

Xing Liu

Xing Liu is a Sitecore MVP with expertise in all aspects of ASP.NET and SQL Server development across a variety of industries including Government, Banking, Healthcare and Energy. He provides technical thought leadership and consulting to SymSoft and client development teams. Xing has deep expertise in using Sitecore Helix in an Agile delivery model to streamline the construction of complex Sitecore websites, portals and their associated authoring environments. Xing is also a globally recognized photographer with an Instagram following approaching 100,000.

Explore topics:

Other Blog Posts from Xing Liu