Friday, March 14, 2014

Sitecore Support Package Generator tool

Earlier days, when we need support from sitecore support, they are asking to submit set of documents. Normally, they are the same set of document like log files, App_Config folder, web.config, etc. This is a time consuming, boring process.

Last year, sitecore released a tool to generate these necessary files for sitecore support automatically.

That is Sitecore Support Package Generator.
http://marketplace.sitecore.net/en/Modules/Sitecore_Support_Package_Generator.aspx

This tool will generate/collect the required files from a given sitecore installation and generate a zip for you or will directly submit it to sitecore support. Cool.. isn't it :-)
This saved lot of time for us. :-)

Quote :
Features
The Sitecore Support Package Generator looks at a Sitecore CMS instance and collects information about:
• Application pool
• Web.config file
• /App_config folder content
• Sitecore and IIS logs
• Windows event logs
• Performance counters
• /bin directory listing
• .NET framework files — required for working with process memory dumps
• Machine's hardware configuration
• IIS application pool identity user permissions
• Hash codes of all files in the solution.
• All files from /temp/__UpgradeHistory folder.


Think of a scenario that you don't have access to your production servers or your production servers are managed by a other team. Then you need to get some details from the server to fix a bug/issue in the production environment.
This tool comes handy in this scenario also. You can provide this tool to those people who manage production servers and just asked them to run this and send you the generated zip. simple. :-)



Thursday, February 20, 2014

How to find packages installed on a Sitecore Instance

Few years back, one of the questions that I got from my manager was "Is there a way to detect/backtrack which packages are installed on a sitecore instance ?"

My answer was "No" to him at that time.

But, recently when I'm going through google, I found a blog post which describe a way to achieve this. Actually, this feature is already there in sitecore. We only have to know the where to look.

Login to Sitecore Desktop
Change database to "Core"
Open Content Editor and expand "/sitecore/system/packages/installation history" node

Here, you can view all the packages installed in the sitecore instance.
One thing to note that is, when you create the packages, remember to use the "Package name", "Author", "Version" fields as needed. Those field values are stored in the package installation history items.

For example, keeping "Package Name" as same for same type packages will store them under the same parent node in sitecore "/sitecore/system/packages/installation history" node.


Following blog post is about a simple tool/webpage to see the above information in a graphical way.
http://sitecorebasics.wordpress.com/2013/11/11/package-history-user-guide/


http://kirkegaard-at.blogspot.com/2013/10/sitecore-package-installation-history.html




Use of EnableEventQueue setting

When an item is updated and published, it did not get reflected on the website. But, when IIS cache is cleared, this new changes started to reflect on the website.

So, I looked into the code and could not find any issue. Then, I moved my focus to the sitecore configurations. Following are the steps that I tried/look.

1. Checked current website name is included in the <event name="publish:end"> node and <event name="publish:end:remote"> node.
    What this setting does is, it says to sitecore clear html cache of the sites specified in that event section, on publish.

2. Then, I looked into EventQueue table in the web database. It does not had any entries. So, that was the issue. So, I change "EnableEventQueues" setting to "true" on CM instance. This did the trick.

Reason for our issue was that sitecore is using EventQueue table entry to clear the cache on publish. Since there were no entries in the table, sitecore did not clear any cache.

Read following blog entries which describe the use of EventQueue table and settings in details to get a better understanding.

http://sitecorebasics.wordpress.com/2011/03/19/basics-of-sitecore-event-queue/
http://www.sitecore.net/Community/Technical-Blogs/Getting-to-Know-Sitecore/Posts/2010/07/Introducing-the-Sitecore-Event-Queue.aspx

Saturday, February 1, 2014

Sitecore IDTable

Recently when I'm trying to clear some of my old documents, I found "Student handbook Web Site .NET developer" handbook. When I go through that document quickly, I saw an entry about "IDTable" in sitecore. Eventhough I have seen this table, I was not aware of the use of that table till now. So, I thought of writing a post regarding the IDTable table.


The IDTable
You can store persistent mappings of arbitrary keys to Sitecore IDs in the Sitecore IDTable. 

By default, this is only used by the Sitecore CMS WebDAV functionality to keep locks on media items in the CM environment and does not need to be synchronized with the CD environment
You configure the location of the IDTable in the web.config file in the IDTable section in the connectionStringName parameter:
<IDTable type="Sitecore.Data.$(database).$(database)IDTable, Sitecore.Kernel" singleInstance="true">   <param connectionStringName="master" />
  <param desc="cacheSize">500KB</param>
</IDTable>
To synchronize the contents of the IDTable between the CM and CD environments, change the connectionStringName parameter in the IDTable configuration section to point to a Core database that is shared or replicated between the environments. Alternatively, it can point to a shared Web database
          Quote "Sitecore CMS 6.6 or later - Scaling Guide"
          http://sdn.sitecore.net/upload/sitecore6/66/scaling_guide_sc66-a4.pdf


IDTable can be used for tasks like keeping track of duplicate items when doing a custom import from another third-party application to sitecore.
   Sitecore.Data.IDTables.IDTable.Add(string prefix, string key, ID id);
By keeping IDs of items that has already imported to sitecore, if you run the import more than once, you have the option of skipping the IDs that already had imported to the system by keeping/monitoring the IDTable entries.

You can find an old blog entry about IDTable from following url :
http://sitecoredev.blogspot.com/2005/11/idtable.html

Updated:
http://sitecorejunkie.com/2014/03/01/synchronize-idtable-entries-across-multiple-sitecore-databases-using-a-composite-idtableprovider/


Thursday, January 23, 2014

Running Sitecore in LiveMode

LiveMode means running the front-end site using the master database (instead of web database).
To do this, in the relevant site definition, change the "database" property to "master"

Also, you need to set the "enableWorkflow" setting to "true" to avoide displaying items that does not reached the final workflow.

i.e.
<configuration>
  <sitecore>
    <sites>
      <site name="[YOUR_FRONT_WEBSITE_NAME]" ... database="master" ... enableWorkflow="true" ... />
    </sites>
  </sitecore>
</configuration>

PlaceholdersEditableWithoutSettings setting from sitecore 6.5

From sitecore 6.5 (CMS 6.5.0 and DMS 2.0.0 rev. 110602 ) onwards,
if you go to the page editor and try to edit, it won't display any add button/placeholder if placeholder settings were not configured in layout details of the item (i.e. item -> presentation -> details)


<!--  WEB EDIT PLACEHOLDERS EDITABLE WITHOUT SETTINGS
      Indicates whether placeholders should be editable in the Page Editor if placeholder settings are not specified.
      Default value: false
-->
<setting name="WebEdit.PlaceholdersEditableWithoutSettings" value="false" />


if needs to use dynamic placeholders or need to edit a placeholder without setting placeholder settings prior, then set this setting to "true".

Friday, January 17, 2014

Ways to Find Versions in Sitecore

To find the current sitecore version

Method 1 :
Login to sitecore desktop then go to the following path
Sitecore Start Button -> All Applications -> System -> About Sitecore

Method 2 :
At the start of the sitecore log files, sitecore writes the version details of its main dlls.
i.e. Sitecore.Kernel.dll and Sitecore.Client.dll

Method 3 :
Following way can be used to find the sitecore dll version.
Wright Click on Sitecore.Kernel.dll in the /bin directory -> Properties -> Details

Note: This method may not actually reflect the current sitecore version correctly, if the dll's are changed/replaced by different sitecore version.



To find the currently installed Module version in sitecore 
(i.e. WFFM, ECM, etc)

Wright click on the relevant .dll file in the /bin directory -> Properties -> Details
   Ex: Sitecore.EmailCampaign.dll