Sunday, April 2, 2017

Sitecore8.1 : Resolve Wildcard (*) Item and fix presentation not cloned from * item


This is the Sitecore structure for wildcard item (*)
  • sitecore
    • content
      • Site name
        • Home
          • Blogs
            • *
        • Globals
          • Blogs Folder
            • Year
              • Month
                • Blog Article 1
                • Blog Article 2
So according to this structure, we have #Wildcard Item(*) under the home node. It is like Blog detail page that is under Blog landing page.


Under Globals folder we have all blogs, those are actual blogs Detail Pages, we need to resolve.



First I have added new configuration file (z.wildcard.config) with the following configurations

  1. created httpRequestBegin processor as a batch to be executed after Item Resolver  to Call Wildcard processor
  2. Sitecore 8.1 observed the following issues
    1. 1. Wildcard items no longer work
    2. 2. Presentation for cloned items not found

Solution:
If you are using MVC with Sitecore 8.1 then add <mvc.getPageItem> after our processor to avoid any route conflict


The last point is to add settings to disable ItemResolving.FindBestMatch because it's enabled in Sitecore 8.1 which may cause wildcard redirect issues



    
  • Add class WildCardItemResolver which include the processor to resolve wildcard



Sitecore : Rendering Exception Handling

To prevent showing yellow crash page if an error raised in one of Sitecore controls  and keep handle errors for developers without showing ...