Pages

Showing posts with label Publish. Show all posts
Showing posts with label Publish. Show all posts

07 November, 2023

Sitecore Scheduled Publish Module Enhancements

Sitecore Scheduled Publish Module gives the content author the option to delay the publishing of an item for a future point in time. This module has been updated to Sitecore 10.3 recently. Also, I did update this module with few additional features for better usage. 

  • Set Scheduled Publish Requestor as Publisher

    A content author schedules a publish request. When the scheduler job executes the request at the appropriate time, it publishes the content as the requestor user. This allows Ops teams to track who initiated the request. If you want to track what items are published, you can override the publish:itemProcessed event to log the details.

    With this change, the actual publish request will be executed in the requestor user context. 



  • Alert content authors if the item is not in final workflow state

    The final workflow state is an important part of Sitecore's workflow system. It helps ensure that content items are published in a controlled manner and are not accidentally changed after they are published.

    If an item scheduled for publishing is not in the final workflow state, the publish job will not publish the item or will publish the last approved item version. To remind the content authors, a warning has been added to the dialog that shows whether the item is in the final state. If the item does not have a workflow, this section is hidden. 






  • Set the current time + 2 minutes as default for publish time

    Choosing the date and time when scheduling a publish was an extra step for content authors. With this change, the current date and time plus 2 minutes will be set as the default publish time in the publish time field.


  • Updated to latest Sitecore CLI and Serialization plugin

    Updated to use the latest version of Sitecore CLI (5.2.113 as of 11/07) with Serialization plugin. 

The Sitecore packages (.zip) are yet to be updated in the repository. Please take the latest codebase for the enhancements.  

01 November, 2022

Sitecore Scheduled Publishing Module - Update

The purpose of Scheduled Publish Module is to give the content editor the option to delay the publishing of an item for a future point in time. Thus, a page or a feature that should go live at a specific time can be created and populated in Sitecore and previewed long before it goes live without the risk of an accidental publish before the specific time. Moreover, there is no need for a content-editor to go to Sitecore and manually publish something at an inconvenient hour, e.g. a New Year’s announcement. Scheduled Publish intends to give the content-editor all features of a normal publish with the addition of automation, timing and notifications.

Updated to Sitecore 10.2

This module was built by Hedgehog few years ago and it was not updated to Sitecore 10. I forked it and updated to work with Sitecore 10.2. As part of this task,

  • TDS project has been removed and converted to Sitecore Content Serialization with version 5.1.x. 
  • Updated the .NET version, referenced latest Sitecore nuget packages and fixed build issues.
  • Updated the documentation from an old source to GitHub readme file.
  • Created a Sitecore Package for installing it without the source.
You can view it here in my GitHub repository. https://github.com/nehemiahj/SCScheduledPublishing.

Docker Asset Image Creation

Lately, I was exploring options to create a Docker asset image for this module. Robbert Hock has created an excellent Docker asset image creator script which can intake the Sitecore package and convert it into an asset image. When you run the script, you may face this issue "The SQL provider cannot run with dacpac option because of a missing dependency". You can follow the below steps to fix it. Otherwise, it was super easy to create the image using this script. 

To fix the dacpac missing dependency issue:
  • Install the following applications by downloading it from here
    • Microsoft SQL Server 2012 Data-Tier Application Framework
    • SQL Server 2012 Transact-SQL ScriptDom
    • SQL Server System CLR Types 11.0
  • Register it using gacutil
    • "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130\Microsoft.SqlServer.TransactSql.ScriptDom.dll


Docker Asset Image:

For the Sitecore Scheduled Publishing module, the Docker image has been published to DockerHub and tagged it for Sitecore 10.2.

Image repository: nehemiah/sitecore-scheduled-publish

Tags: 10.2-1809

Dockerfile instructions:
  • cm:
COPY --from=<sitecore_scheduled_publishing_image> \module\cm\content .\


Reference:

DacFx Issue: https://stackoverflow.com/a/41777959/3016347
sitecore-module-docker-asset-image-creator: https://github.com/KayeeNL/sitecore-module-docker-asset-image-creator

01 August, 2016

Sitecore – Unlock locked item by non-admins

This is a very simple module that will help the non-admin content authors to unlock the locked items. The user has to be in a defined role to access this module.
  • A button called Unlock will be added to Publish chunk.
  • Add the Content admin who needs access to unlock item to the role - SitecoreContentAuthorUnlock
  • To unlock, content admin can click the Unlock button for locked item and item will be unlocked. 
Package will install these items
  • An assembly
  • Sitecore role – “SitecoreContentAuthorUnlock”
  • Configuration file in Includes folder
  • Button in Publish chunk (core item)
You can download the Sitecore package here and install it using Installation Wizard.

    blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }