1

We are testing a project that got upgraded from an ancient 6.5 version to 8.1. We noticed that events related to publishing certain items got fired without any reason (well, not that we can see). The logs do mention publishes, so the event is right: somehow the publish does get triggered.

But we have no clue why.. we certainly did not perform a manual publish. We do have some automated processes but not on those items. And it doesn't happen on the old version. Any idea why since the upgrade items get published without anyone actually publishing them?

3

In our solution we had some code that published single items using the PublishManager.PublishItem. This still works in Sitecore 8, but an overloaded method was added with one extra parameter: "related items". And we found that this parameter is true if not added explicitly:

public static Handle PublishItem(Item item, Database[] targets, Language[] languages, bool deep, bool compareRevisions)
{
  return PublishManager.PublishItem(item, targets, languages, deep, compareRevisions, true);
}

So our publish code was still calling a working publish method, but included the related items now - which was not intended.

More info on publishing with related items can be found here: What does the "Publish related items" checkbox do in Sitecore?

If you are upgrading a code base from a real old version (pre 7.2) to a new version, remember to check if you have any automated publishes as publishing these related items is probably not what you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.