10

I am having trouble publishing an item. The item is not in a workflow state.

Publishing.log:

12448 08:19:11 INFO  [Publishing]: Starting to process 26 publishing options
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:cs-CZ, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:da, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:nl-BE, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:en-GB, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:en, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:fi-FI, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:fr-BE, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:fr-CA, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:fr-CH, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:fr, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:de-AT, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:de-CH, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:de, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:el-GR, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:it-IT, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:ja-JP, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:ko-KR, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:nb-NO, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:pt-BR, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:ru, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:es-AR, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:es-CO, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:es-MX, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:es, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:sv-SE, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
12448 08:19:11 INFO  [PublishOptions]: root:{2973AF61-669A-463A-96ED-A42D771787F0}, language:tr-TR, targets:Web Preview, database:web-preview, mode:SingleItem, smart:False children:False, related:False
13072 08:19:11 WARN  SingleItemPublish detected. PublishContext was overridden with MaxDegreeOfParallelism=1, DisableDatabaseCaches=False.
13072 08:19:11 INFO  Starting [Publishing] - AddItemsToQueue
13072 08:19:11 INFO  Finished [Publishing] - AddItemsToQueue in 0 ms
13072 08:19:11 INFO  Starting [ParallelPublishing] - ProcessQueue
13072 08:19:11 INFO  Processing queue
13072 08:19:11 INFO  Finished [ParallelPublishing] - ProcessQueue in 198 ms
13072 08:19:11 INFO  Publish Mode : SingleItem
13072 08:19:11 INFO  Created : 0
13072 08:19:11 INFO  Updated : 0
13072 08:19:11 INFO  Deleted : 0
13072 08:19:11 INFO  Skipped : 702

Log:

8696 08:13:43 INFO  AUDIT (sitecore\admin): Publish, root: {2973AF61-669A-463A-96ED-A42D771787F0}, languages:cs-CZ, da, nl-BE, en-GB, en, fi-FI, fr-BE, fr-CA, fr-CH, fr, de-AT, de-CH, de, el-GR, it-IT, ja-JP, ko-KR, nb-NO, pt-BR, ru, es-AR, es-CO, es-MX, es, sv-SE, tr-TR, targets:Web Preview, databases:web-preview, incremental:false, smart:false, republish:true, children:true, related:false
8696 08:13:43 INFO  AUDIT (sitecore\admin): [Publishing]: Starting to process 26 publishing options

The item has an english version. Other sibling items that appear to be identical can be published without issue. There are no publishing restrictions on the item.

enter image description here

I also verified that no parent items have publishing restrictions.

7
  • Publishing.CheckSecurity=true <-- is this enabled in your configuration?
    – Anicho
    Oct 6, 2016 at 13:56
  • Updated answer, for if checksecurity = true
    – Anicho
    Oct 6, 2016 at 14:03
  • It is set to false as well.
    – jrap
    Oct 6, 2016 at 14:05
  • While troubleshooting, I duplicated the item and attempted to publish the duplicate- to my surprise it worked. However, while the item was indeed in the preview database, when I tried to render it on the front end, I received a NullReferenceException at Sitecore.Data.DataProviders.Sql.SqlDataProvider.ResolvePathRec(String[] path, PathCache cache, CallContext context) Which seems to point to the fact that the original item was partially published (whatever that would even mean). I renamed the duplicate item and published and it resolved at the new path.
    – jrap
    Oct 6, 2016 at 14:06
  • ^ This still doesn't explain the original problem and is really just a band-aid.
    – jrap
    Oct 6, 2016 at 14:09

5 Answers 5

11

My particular issue was certainly unique, but may help someone in the future. We had mistakenly added three database entries on the server when only two exist:

  1. web
  2. web-preview
  3. web-delivery

The web entry used the same connection string as the web-preview element. There were only two database targets defined- web-delivery and web-preview. Nonetheless, somehow the duplication confused a portion of the publishing process.

I removed all traces of web from the configs on the authoring server and it is now performing as expected.

7

Is your item under Workflow?

Or more specifically, is it in a non-final Workflow State? If so, it would not normally get published.

enter image description here

From a dated but still valid documentation reference:

The workflow state template contains the Final checkbox. If the Final checkbox is selected, then any items in this state are publishable.

Source: Workflow Reference

6

It is worth checking publishing restrictions. In the Publish ribbon whilst the item you want to publish is selected, click on Change button under the Restriction section. You should see the following:

enter image description here

Make sure the check box in the image is checked and the dates for publishing are valid.

In the Item tab, of this dialog there is also a check box for publishing this would set the standard values check box never publish so I know it's not that.

Also ensure the version you are looking at is publishable.

If Publishing.CheckSecurity=true

The following is from Mark Lowe Blog Post

After searching for a while, we found out the reason for PublishAgent skipping all items was quite obvious: We have set Publishing.CheckSecurity=true to make sure users could only publish the items they were allowed to. Unfortunately PublishAgent runs as sitecore\Anonymous who of course doesn’t have sufficient rights.

To solve this problem, you can implement a class that inherits PublishAgent and overrides the Run method. Then use UserSwitcher to switch to a user that has the appropriate rights.

public class AuthenticatedPublishAgent : PublishAgent
{
    private readonly string _userName;

    public string UserName
    {
        get
        {
            return this._userName;
        }
    }

    public AuthenticatedPublishAgent(string sourceDatabase, string targetDatabase, string mode, string languages, string user) : base(sourceDatabase, targetDatabase, mode, languages)
    {
        this._userName = user;
    }

    public void RunAsUser()
    {
        if (string.IsNullOrEmpty(UserName) || !Sitecore.Security.Accounts.User.Exists(UserName))
        {
            Log.Error(string.Format("Unable to run AuthenticatedPublishAgent as user: {0}", UserName), this);
            return;
        }

        var user = Sitecore.Security.Accounts.User.FromName(UserName, false);

       using (new Sitecore.Security.Accounts.UserSwitcher(user))
       {
           base.Run();
       }
    }
}

AuthenticatedPublishAgent.cs

<agent type="MyNameSpace.AuthenticatedPublishAgent" method="RunAsUser" interval="01:00:00">
  <param desc="source database">master</param>
  <param desc="target database">web</param>
  <param desc="mode (full or smart or incremental)">smart</param>
  <param desc="languages">en</param>
  <param desc="user">sitecore\AutoPublishingUser</param>
</agent>

Scheduling Agent Config

1
  • 1
    Thanks for the tip, but I had checked there as well... Publishable, no from/to dates selected.
    – jrap
    Oct 6, 2016 at 13:52
1

Some other things to check:

  1. That there are no parent items with publishing restrictions set (e.g Never Publish is ticked) - use the gutter to identify this. left click on the content tree and select Publishing Warnings.
  2. Publishing Targets are enabled under the targets tab in publishing restrictions

Also are you doing a full publish or smart publish? - smart publish can be a bit unreliable.

1
  • I had verified #1 manually prior, but turned on the gutter and reverified- no ancestors with publishing restrictions. There were no targets selected for Publishing Targets (i.e. no restriction), but I tried purposely selecting the Web Preview option to no avail. Republish is what I'm using.
    – jrap
    Oct 6, 2016 at 13:44
1

I ran into this issue again of late. To resolve the issue, I ran CleanUp on the master and web databases. Due to TDS syncing, some orphaned items were created and not being abolished by the publishing process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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