Suppress Comment Sitecore bug – description and walkaround solution.
Have you ever seen some strange text that “Unbucketable Item stored in an Item Bucket” – but as a good developer you are sure that in __Standard Values you have selected magic checkbox “Bucketable” also you know that you don’t have any custom code which could change that value? Also, your workflow doesn’t contain any custom code and you don’t know why is it happen? If yes, this text is definitely for you.
First of all, I want to show you how this error looks like:

Now maybe you are curious as I was, why it happens… The answer was not easy to find I’ve spent a lot of time trying to find some custom code in our solution which could change that value… But after all investigations, I’ve started to look for something in workflow and then the party has started. I will show you all the steps which need to be checked. If you are acquiring a similar issue in your solution, you can easily go through them and if all will fit then you can use simple walkaround which helps in that case. I’m also waiting for a Sitecore fix to this bug maybe someday someone will fix it!
So, first of all, you need to check if your’s template __Standard Values has checked the Bucketable checkbox.

Also, you need to check if there is any workflow selected. In my case, it would be one of preinstalled on clean Sitecore installation: Workflows/Social Message Workflow

You need to check one last thing – workflow settings. To occur this issue the workflow should have checked checkbox Suppress Comment on Submit action.

If all checked things match to your case there is a big chance that you have this issue. Next thing is that you need to add an item based on this template into bucket.

Then you need to simply edit some field in my case it will be a “Sample field to edit”

Until now everything was normal and fine but now in a few steps, we will see the issue. Now let’s say that our editor is very lazy.. and he or she don’t want to click on save and after that click on Review tab and Submit that the item could go to the next step. Our editor is smart and know’s that if he or she will click on the Submit button, Sitecore will ask about if the editor want to save the changes to the item like on the picture below.

And after accepting the changes we can see that our item is not in the next workflow stage.

Additionally, if we go to the other item and go back to our created item it has the not nice message that: “Unbucketable Item stored in an Item Bucket”. If we click one more time in the Submit button we can see some Sitecore message like this:

Please now take your focus on Workflow part of Review tab.

Now it is incorrect workflow state but unfortunately, we still have this awful Unbucketable message… How to avoid that situation… There are two simple solutions.
First is uncheck checkbox Suppress Comment like this:

Now it will ask about comment when we will go to the next workflow step but it will not change our item bucketable field value.
The second walkaround is to write some action to Submit button which simply reloads the item.
using Sitecore;
using Sitecore.Workflows.Simple;
using System;
namespace Application.Web.Admin.Workflows.Actions
{
[Serializable]
public class ApproveAction
{
public void Process(WorkflowPipelineArgs wpa)
{
var item = wpa.DataItem;
string load = String.Concat(new object[] { "item:load(id=", item.ID, ",language=", item.Language, ",version=", item.Version, ")" });
Context.ClientPage.ClientResponse.Timer(load, 100);
}
}
}
This simple solution also works fine but it is the only walk around. If you will find some other solution to that please feel free to comment on my post. Maybe together we will find some better solution to this problem.
