Sitecore not publishing bucket folders - sitecore

We have a content folder that has been turned into a bucket to manage the sheer number of items it will contain. The bucket items are published via a workflow and the bucket items are left to be published by the scheduled publish that runs periodically.
For the most part, all works well and fine with regards to the bucket item creation and editing process. But the bucket folders refuse to publish some times. After inspecting the bucket folders, we found that the bucket folders have Version 1 created but when you go to check that version it just lists 'Modified [Not set] by'. This causes the folder items to not be registered in the PublishQueue table and not get published.
The simplest way to fix this is by right-clicking on the folder item, click on Rename and then just click OK on the popup message. This updates the version message to the propery modified by and date values. And also the publish process picks it up.
Has anyone come across this issue or has any tips for us to try?

This is a know bug.
1) Place the attached Sitecore.Support.413254.dll file to the Webiste\bin folder.
2) Backup the "Sitecore.Buckets.config" file from the Website\App_Config\Inculde folder.
3) In the "Sitecore.Buckets.config" file , change the following processor:
<publish>
<!-- Extending publish pipeline to always add bucket folders to the queue when a bucketed item is being published -->
<processor patch:after="processor[#type='Sitecore.Publishing.Pipelines.Publish.AddItemsToQueue, Sitecore.Kernel']" type="Sitecore.Buckets.Pipelines.Publish.AddBucketFoldersToQueue, Sitecore.Buckets" />
</publish>
with this processor:
<publish>
<!-- Extending publish pipeline to always add bucket folders to the queue when a bucketed item is being published -->
<processor patch:after="processor[#type='Sitecore.Publishing.Pipelines.Publish.AddItemsToQueue, Sitecore.Kernel']" type="Sitecore.Support.Buckets.Pipelines.Publish.AddBucketFoldersToQueue, Sitecore.Support.413254" />
</publish>
Here is the dll:
https://www.dropbox.com/s/thr94mqi8967dab/Sitecore.Support.413254.dll?dl=0

Related

Clear cache for specific S3 bucket items/files manually/using S3 Console GUI

I updated some images manually, but changes aren't reflected on my website due to caching.
What are some approaches to manually updating the cache using the GUI? (Say you don't want to go to the time/trouble of installing AWS CLI / Boto3 just now).
Here's the one method I found. I'm interested to learn others!
Browse to your file https://s3.console.aws.amazon.com/s3/buckets/BUCKETNAME/PATH/TO/FILE/
Check/select items for which to clear cache
Select the Edit Metadata action (under Actions menu, "Edit actions" group)
Note the warning text reads: This action creates a new version of the object with updated settings and a new last-modified date. (This is the desired effect.) Note the other items, as they may have an impact in your case.
Press "Save Changes" (not necessary to make any other changes on this screen).
Caches will be cleared for selected items immediately.
Pros:
Handpick files
Cache updates immediately
Cons:
Time-consuming if files are in multiple directories (multiple files at same path can be checked at once)
There may be undesired side effects, depending on bucket ownership/policy, per the Edit Metadata screen's warning
AWS S3 Console: Item actions: Edit Metadata: Edit Metadata info text states that cache will be updated

Refresh Sitecore index to include CD's

I've written some code to refresh an index when an item is programmatically added to Sitecore. Now as the live system is made up of 1 CM and 2 CD Servers I need my code to also trigger the indexing to be refreshed on the CD Servers (unfortunately my dev machine is just a single box so I can't test this fully). I've looked online but can't find anything about this when triggering a re-index programmatically.
So the question is do I need to write code for this or does Sitecore do this by default and if I do need to write code, does anyone have ideas how I go about this. My current code is below.
ISearchIndex index = ContentSearchManager.GetIndex("GeorgeDrexler_web_index");
Sitecore.Data.Database database = Sitecore.Configuration.Factory.GetDatabase("web");
Item item = database.GetItem("/sitecore/content/GeorgeDrexler/Global/Applications");
index.Refresh(new SitecoreIndexableItem(item));
My config for the index has the remotebuild strategy enabled
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/remoteRebuild" />
As #Hishaam Namooya pointed out in his comment, publishing from master to web should trigger the web index updates out of the box, unless you've disabled something in the configurations.
Note that items won't publish unless they are in a final workflow state, so if you want a completely automated process that creates the item, updates the local index, and then immediately updates the web index, you will also need to update the workflow state to your final approved state and then trigger a publish of the item.

Sitecore: Display newly created bucketed item

Im using sitecore 8.1 and I have a bucket that accepts a bucketable template. When I right-click the bucket and add an item based on that template, then it gets added to bucket using the default bucket hierarchy (as expected).
The issue is the content editor doesn't display the added item. It in fact displays the parent folder item i.e. /sitecore/content/x/Resources/Document Repository/2016/04/25/20/35
How can I change this so that the added item gets displayed and not its parent?
Thanks
If viewing buckets is enabled (view tab in the ribbon) then the content editor usually loads the created (bucketable) item. Have you reviewed the log files for possible errors? Have you maybe changed / patched the original Sitecore.Buckets.config file?

Sitecore Publish Agent not picking up queued items,for incremental publishing

We have the Publish Agent set to run every 15 minutes with 'Incremental Publish'. Sitecore client users 'Check In' and 'Approve' an item in Sitecore to queue the item. They can also do a manual publish if required to make something live immediately. We are seeing some issues where some of the items that are checked in and approved through the workflow are not getting picked up by the scheduled publisher. Also, when the user tries to publish from the publish tab the parent publishes but not the child items. The child items have to be published one at a time.
To me the issue seems to be that these approved items are not getting added to the publishing queue. But I am not certain of this.
We installed a module called 'Publishing Status Manager' which basically shows a Sitecore user the various publish operations that are active or in queue. This problem started occurring after that module was installed. I am not sure if that is the cause of this issue though.
I am looking for some suggestions/advice on where to look and how to fix this issue.
Items that are in the final workflow step is always added to the publish queue. I guess your issue revolves around the fact that the items in the workflow is not in the final workflow step. Please ensure that the actually reaches this state.
If you would like to check what's in the publish queue, read this article:
http://briancaos.wordpress.com/2011/06/16/sitecore-publish-queue/
You must use the code as described in "THE CURRENT VIEW" as it tells you what is published next time an incremental publish is executed.
Also, ensure that the publish agent publishes the current targets and correct languages:
<agent type="Sitecore.Tasks.PublishAgent" method="Run" interval="00:00:00">
<param desc="source database">master</param>
<param desc="target database">web</param>
<param desc="mode (full or smart or incremental)">incremental</param>
<param desc="languages">en, da</param>
</agent>
It was just the module that we installed that over wrote the publishing pipeline
Publish agent will not pick up queued item if value of publishing.checksecurity is true in web.config. You can make this value as false. Or else create a user, give it proper access rights and override the agent to switch the user.

Sitecore allow role to publish content in specific areas only

I am trying to create a role within Sitecore which can publish content, but only within a specific area(s) of the site. I've added the standard Sitecore\Client Publishing role to my role, but I can't see how to prevent the role from being able to publish all areas of the site. I've looked at the Security editor and the Access viewer, but setting the write access of the sections only seems to affect the ability to edit those sections and has no effect on the ability to publish on those sections.
Workflow is the typical way this is handled. Giving roles access to approve (this could be called 'publish') content of certain sections of the content tree will be the best way to achieve what you are describing. Combine this with an auto-publish action to make it more user friendly.
One thing to keep in mind though using this method is referenced items (images from media library the content may be using for example). Take a look at the 'Publishing Spider' module on the shared source library http://trac.sitecore.net/PublishingSpider
EDIT: Update
I recently discovered this setting in the web.config: "Publishing.CheckSecurity". If set to true, this setting will only publish items if the user has read + write on the item and will only remove items from the web DB if the user has delete permissions.
I had a similar situation once and I created roles per section which only had read and write to that section and no where else (let say 'editor section 1') and another role which only had publishing permission for that section (let say 'publisher section 1'). Then added 'editor section 1' role to 'publisher section 1' role which gives you the role for publishing only specific section.
You do not need multiple workflows, same workflow with multiple roles can also achieve this goal
Answer to this is to set Publishing.CheckSecurity to true
You need to find this code inside web
<!-- PUBLISHING SECURITY
Check security rights when publishing?
When CheckSecurity=true, Read rights are required for all source items. When it is
determined that an item should be updated or created in the target database,
Write right is required on the source item. If it is determined that the item
should be deleted from target database, Delete right is required on the target item.
In summary, only the Read, Write and Delete rights are used. All other rights are ignored.
Default value: false
-->
<setting name="Publishing.CheckSecurity" value="false" />
Set the value="true"
But again you have to govern the security tightly, and assign user role properly. Failed to
do so you will experience buggy publishing.
Hope that will help