Pages

28 October, 2014

Sitecore - Smart Tools - Copy & Move Item/Sub-Items

This is a very simple module that will help the Sitecore content authors to Copy and Move items based on the requirement.

Functionalities:
 - Copy all the sub-items
 - Copy only the current item (no sub-items)
 - Move all the sub-items.

Installation:
 It is a Sitecore package and you can install it using Installation Wizard. Download here

Usage: 
 - Once installed, a chunk will added to Home tab with 3 buttons.
 - On clicking these buttons, a dialog will be opened to choose the destination.
 - Based on the selection, items will be moved or copied to the destination.

06 August, 2014

Unlocking Sitecore items leads to Anonymous Update

In Sitecore 6.6, if a content author unlocks his locked Sitecore items (using Review / My Items command), Sitecore executes a job and unlocks the items. When it unlocks, it also updates the item’s modified details with anonymous user.

Below item was modified by a test user using Lock and Edit.


Once user unlock the item using Sitecore unlock feature, the item will be updated by anonymous user. 


Sitecore support team has acknowledged this as a bug (#416532) and have provided a fix.

- Place the assembly in the bin folder. 

- Replace the following lines in your Website/App_Config/Commands.config file:

   <!-- <command name="webedit:unlock" type="Sitecore.Shell.Applications.WebEdit.Commands.Unlock,Sitecore.Client"/>-->
   <!-- <command name="webedit:unlockall" type="Sitecore.Shell.Applications.WebEdit.Commands.UnlockAll,Sitecore.Client"/>-->
   <command name="webedit:unlock" type="Sitecore.Support.Shell.Applications.WebEdit.Commands.Unlock, Sitecore.Support.338528"/>
   <command name="webedit:unlockall" type="Sitecore.Support.Shell.Applications.WebEdit.Commands.UnlockAll, Sitecore.Support.338528"/>

17 July, 2014

Sitecore 6.6: Enhanced Device Editor Dialog

Let’s say we have configured same Sublayouts and Renderings multiple times in a page. For a content author, it is important to identify which control is used for a section in the page. Currently content authors have to go through each control and check the data source and placeholder to identify the right control for a content in a page. 

Same control like Sample Sublayout is added twice and content authors have to edit each control and find the right control to modify a content. 


Enhanced Device Editor Form will help the content authors to identify the appropriate controls quickly with description. 
  • It gives content authors a text field (Description) in rendering parameters for each control (sublayout, XSL rendering etc.).
  • Content authors can type in the text and differentiate between the identical controls.
  • Description text will be displayed in the device editor dialog along with Control name and Placeholder. So content authors can easily identify the control to be modified.
Installation:
  • Package can be downloaded from Sitecore Marketplace
  • Sitecore version should be 6.6. For other version, I will update it in my blog.
  • Before installing the package, please take the backup of two XML controls from the web root folder.
  • \Website\sitecore\shell\Applications\Layouts\DeviceEditor\DeviceEditor.xml
  • \Website\sitecore\shell\Applications\Layouts\DeviceEditor\DeviceRendering.xml
  • After taking the backup, install the package. Package has an assembly (EnhancedDialogs.dll) and 2 XML controls. That’s it.
  • To revert back, you can replace the XML controls of the device editor folder and remove the assembly (EnhancedDialogs.dll) from the bin directory. 
Once installed, you can add the description in the rendering parameters and that will show in the device editor. 





29 June, 2014

Sitecore Task Initiator - A simple module to initiate the scheduled task

This module helps Sitecore Administrator to initiate the scheduled tasks configured in the content tree. The module has a Sitecore Scheduled Job admin page and a Sitecore Role. Admin page will list down all the tasks in the content tree with a button to initiate the task. Sitecore role is for the Sitecore administrator who can add a user to this role by which user can initiate the Task.

Installation:
Use Sitecore Installation Wizard to install the package which contains an admin page and a Sitecore role. Download Link.

How to access the page:
Authorized user can access the page using the below url.
http://domain/sitecore/admin/jobs.aspx

How to authorize a non-admin user:
All administrator can access the page without any role. For a non-admin user, an administrator can add them to the role - Sitecore Task Initiator. This role will allow the non-admin user to access the page and initiate the task.
Note: This role will not give any access to other admin pages.

Email:
An email will be sent to the list of configured administrators with the task details and initiation time. Administrator can configure the email details in the jobs.aspx page.
MAIL_FROM = "ScheduledJob@SitecoreSharedSource.com";
MAIL_TO = "";
MAIL_CC = "";

In version 2.0, I am planning to add the below functionality.
- Logs for the tasks can be obtained in admin page.
- Logs will be sent to the initiator and the admin.





12 June, 2014

Sitecore CMS – Log Rotator Job

I have created a Sitecore Job to compress the Sitecore logs and move it to a separate folder.
  • Download the package here.
  • Install it using Sitecore Installation Wizard.
  • Create a folder in the Data Folder with name ‘rotatedLogs’. You can change this option ‘LogRotatorFolder’ in the SitecoreLogRotator.config after the package installation.
  • Minimum number of logs to keep in actual log folder can be configured in the above configuration. 
  • You can change the frequency of Sitecore Job as per this article.


04 April, 2014

Sitecore: Site resolver issue with similar domains

I faced an issue with Sitecore Site resolver with similar domain (hostName).

If there are two different websites with similar domain (www.example.com and www.example.com.pl), Sitecore resolves the site based on the order of site node in the web.config (or SiteConfiguration.config in includes folder).

Configuration: (Not Working)
Order 1: <site hostName=”www.example.com” …
Order 2: <site hostName=”www.example.com.pl” …

Sitecore resolves to www.example.com even though we browse www.example.com.pl.
--------------------------------
Configuration: (Working)
Order 1: <site hostName=”www.example.com.pl” …
Order 2: <site hostName=”www.example.com” …

Here, order has been changed to COM.PL first and Sitecore resolves properly for both the domains – www.example.com, www.example.com.pl


Is it a Sitecore site resolver issue or is it an expected behavior?

Sitecore support ticket has been created – 408068. Waiting for their inputs…
J


Sitecore: Reset Sitecore admin account password to default

Sitecore administrator might have forgotten the admin password.
If you would like to reset it to default, you can follow the below steps. Password will be reset to ‘b’.

In Sitecore Core DB, you can run this attached SQL script and this will reset the password to ‘b’.









Hope this helps!!! 

06 February, 2014

Sitecore – IIS Output Cache – Handler doesn’t return proper data.

Recently we migrated our website to Sitecore.NET 6.6.0 (rev. 130529). We have a custom handler (.ashx) to pull data from database in JSON format. We experienced Inconsistency in the response while executing handler. It worked for first two times and later it just responded with last response and request was not even hitting Sitecore. IIS Output caching (User-mode or Kernel-mode output caching in IIS) itself sent the cached response.

Later we came to know that IIS output caching is not supported officially by Sitecore – Sitecore doesn’t support ASP.NET Output Caching.

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