Monday, February 6, 2012

Sitecore Fetch Squad

Automated crawler fetching websites and blogs from Sitecore content

Archive for the ‘Sitecore Blogs’ Category

Sitecore USA is looking for more brain power

Posted by admin On October - 30 - 2011
Do you wake up in the morning and pop up Sitecore Rocks before getting your first cup of coffee? Can’t live without Sitecore? Here is your chance to join us in this continuing thrilling journey to success. We are looking for an experienced Solution Engineer.


Here is a short extract from the job description:

Solution Engineer

Sitecore USA is looking for an ASP.NET solution engineer to assist our implementation partners with best practices guidance, troubleshooting and complex customizations.
Sitecore is the leading Enterprise .NET Web Content Management System on the market today. The Solution Engineer will work from our Mill Valley, California office (just 10 minutes north of San Francisco) or our Northeast US office.
Sitecore implementations are handled by our network of partners. Because of the complex nature of the Sitecore system, however, our partners often need assistance in mapping customer requirements to implementation best practices. The Solution Engineer will work with partners to understand customer requirements and determine the proper implementation approach. The Solution Engineer may also create prototypes of these requirements. In addition, the Solution Engineer may troubleshoot implementations that are experiencing performance or functional issues.
Full job description here.

Consulting and Supporting Sitecore Developer Community

Old Search is deprecated in Sitecore 6.5

Posted by admin On October - 30 - 2011
I’ve blogged about this before, now it’s official. If you have not seen this before, you can find the following in the Release Notes for 6.5:
The Sitecore.Data.Indexing namespace has been deprecated and will be removed in a future version of the CMS in favor of the more powerful and flexible Sitecore.Search classes and corresponding index definitions.


Now it’s a good time to revisit the functionality build on top of “old” search and re-implement it with Sitecore.Search namespace.
Related documentation:
http://sdn.sitecore.net/upload/sitecore6/sitecore_search_and_indexing-a4.pdf

Consulting and Supporting Sitecore Developer Community

How to verify HTML cache is working

Posted by admin On October - 30 - 2011

Greetings,

Here is a quick guide about how to verify that your presentation components (XSLTs, WebControls or Sublayouts) are getting cached.

For more details on how the HTML caching works, see section “3.4.2 Managed Web Site Caches” within Cache Configuration Reference and Chapter 4 within “Presentation Component Reference”.

1. Enable caching settings for your presentation control

Depending on your needs and implementation specifics, you can apply caching on different levels:

- via Layout Details dialog:

image
- on the definition item of the presentation control:

SNAGHTML1cd434f
- within the markup on the control itself if it is bound statically:

   1: <form id="mainform" method="post" runat="server">

   2:     <div id="MainPanel">

   3:       <sc:XslFile ID="sampleXsl"

   4:                   Path="/xsl/sample rendering.xslt"

   5:                   Cacheable="true"

   6:                   VaryByData="true"

   7:                   runat="server" />

   8:       <sc:placeholder key="content" runat="server" /> 

   9:     </div>

  10: </form>

More details about it can be found within Chapter 4 of the “Presentation Component Reference” document. Here is one important snippet from this doc:

When you dynamically bind a rendering to a placeholder using layout details, cache settings explicitly defined in layout details override cache settings defined in the rendering definition item.
Cache settings defined in the definition item apply only when no caching settings exist in the Caching section in the Control Properties dialog.

This post does not explain the difference between cache variation settings like VaryByData or VaryByDevice. Consult the official documentation mentioned above in order to find appropriate strategy for your site.

2. Verify that the change to the cache setting got published to the “web” database.

For that, you can use the database selector at the bottom right corner and then open Content Editor to browse the content of the published database.

SNAGHTML1d452ab

In a distributed server scenario, such things as cache clearing may be factoring in. So make sure that the data cache is properly cleared after publishing.

3. Use Sitecore Debugger to explore Trace

After you confirm that the cache setting were published, verify that Sitecore is caching it using Sitecore Debugger. The article is for Sitecore 5.3 but most concepts are still valid for your version.

3.1 To start the debugger, click on the “Debug” item in the menu:

image

3.2 When the debugger is launched, make sure to disable “Rendering Information” feature, otherwise caching won’t work within the debugger:

image

3.3. Locate the page where the presentation component is placed.

3.4. Refresh the page a couple of times.

3.5. Scroll down to the “Trace” section and locate your rendering:

image

If the control is cached, you should see the highlighted (using cache) string.

4. Rendering Statistics page

Another way to confirm is to launch the “Rendering Statistics” page: /sitecore/admin/stats.aspx where you can see the number of times your rendering is fetched from cache vs. total render count:

image

As you may have guessed, the value within the “From cache” column should not be zero.

5. Verify that HTML caching is turned on.

If the steps above indicate that presentation component is not getting cached, consult you’re the cache page: /sitecore/admin/cache.aspx

5.1 Find the current site that you’re running. By default, it should be “website”.
5.2 Find the column for html cache of your website.
5.3 Verify that the MaxSize column is not set to zero.

SNAGHTML1dfb62e

6. Verify the configuration

If the cache page shows zero, then it’s time to review your configuration.

Within web.config, make sure that:

6.1 Default HTML cache size is not set to zero:

   1: <setting name="Caching.DefaultHtmlCacheSize" value="5MB"/>

6.2 Locate your website definition within the <sites /> section and make sure that cacheHtml is set to “true” and the value of “htmlCacheSize” is not set to zero:

   1: <site name="website" ... cacheHtml="true" htmlCacheSize="10MB" />

6.3 Locate the <cacheSizes /> section next to the <sites /> section. Make sure that the html cache is not set to zero here too:

   1: <cacheSizes>

   2:    <sites>

   3:       <website>

   4:          <html>10MB</html>

   5:          ...

   6:       </website>

   7:    </sites>

   8: </cacheSizes>

This should be more or less sufficient in order to troubleshoot html cache issues.

HTH.

Consulting and Supporting Sitecore Developer Community

Teach Sitecore to ignore a directory

Posted by admin On October - 30 - 2011

This is a really quick post dedicated to the following scenario. You have either a standalone asp.net web app or legacy website. You want to host it underneath the web root with Sitecore instance configured and have Sitecore completely ignore the whole path (“/webapp”).

The issue you may be having is that during the request, Sitecore would try to “take over” and resolve a dynamic item “webapp” from the content tree which obviously does not exist. So you would get a “document not found” error*:image

*Depending on the version of IIS, you may be experiencing different behavior.

There is a quick way to resolve this. Simply add the path to your standalone website to the “IgnoreUrlPrefixes” list:

   1: <!--  IGNORE URLS

   2:       Set IgnoreUrlPrefixes to a '|' separated list of url prefixes that should not be

   3:       regarded and processed as friendly urls (ie. forms etc.)

   4: -->


   5: <setting name="IgnoreUrlPrefixes"                value="/sitecore/default.aspx|/trace.axd|.....|/webapp" />

Now if your are not feeling nerdy today, stop reading and go fix it!

For the ones who continue reading, I can tell that the “ignore url magic” happens within the <httpRequestBegin /> pipeline which is invoked when the request goes through Sitecore.

So before the ItemResolver is hit, the “IgnoreList” processor would read the value of the “IgnoreUrlPrefixes” setting and figure out whether the pipeline needs to be aborted or not:

   1: <httpRequestBegin>

   2:    ...

   3:    <processor type="Sitecore.Pipelines.HttpRequest.IgnoreList, Sitecore.Kernel" />

   4:    <processor type="Sitecore.Pipelines.HttpRequest.SiteResolver, Sitecore.Kernel" />

   5:    ...

   6:    <processor type="Sitecore.Pipelines.HttpRequest.ItemResolver, Sitecore.Kernel" />

   7: </httpRequestBegin>

That’s all folks!

Consulting and Supporting Sitecore Developer Community

Sitecore Support: Help us help you!

Posted by admin On October - 30 - 2011
Greetings,
Quite an unusual post from me today. I spent last week working on a few support issues via the helpdesk, and must say, I enjoyed being so close to the customer and partners. I’ve been doing this for more than 5 years now and still remember the fun old days where we had email based support and a shared spreadsheet with the tickets. But we’ve come long ways, and product support is no exception. In April, actually, we hit a record of 859 support tickets filed by our customers and partners across the globe. That’s no walk in the park!

I perceive Sitecore Support as a two way street. While we constantly work on improving the quality of our support services, tools and documentation, I believe that our customers and partners are getting better in filing those support tickets, which I have witnessed over the course of last days.
In order to help us help you, our team came up with a “Helpdesk Best Practices” document which is a really good read.
Also, here is the list of items that I personally would like to recommend. Some of them are already included into the aforementioned document.

  • Always attach your web.config along with the output from /sitecore/admin/showconfig.aspx
  • Always attach latest logs.
    If you are reporting a bug, verify that your log actually reflects the activity of your scenario.
  • Feel free to package up some content to reproduce.
  • Bullet lists are way better to understand than long unstructured sentences.
  • Sticking to the point and brevity helps tremendously.
    Try re-reading your support ticket at least once before sending it over.
    At the same time, some background information would not hurt.
    For example:
    we are having an issue with X. BTW, we recently upgraded from 6.0.0 to 6.2. Update-5. The problem was not happening before.
  • Support people love screenshots!
  • Walkthrough video or a short screencast is even better!
    There are a few free products that would help with that.
  • Keep in mind that it may take hours to respond while search takes seconds:
    • Have you checked SDN recently?
      • Our search is better than before. It actually finds stuff ;-)
    • Have you looked on the Forum?
      • There is a high chance someone had the same problem.
    • Have you looked on the blogs?
      • I use Google Reader sometimes to search within the Sitecore RSS pipe. Works great!
  • Licensing question?
    • Better to ask the regional Sitecore representative
  • Running old version of Sitecore?
  • Help us rule out possible options:
    • Try another browser
    • Try isolating custom code
    • Try isolating custom configuration
      It often helps to plug in clean web.config and see if the problem is configuration.
    • Try the same scenario on another item
    • Try another machine
    • Try another server/environment
  • And finally, remember that the support technician can’t see your screen, doesn’t know the error message you are getting and doesn’t know what UI you are logged into.
    The more relevant information you provide, the clearer a picture the supporter has and the faster they can help you.

I sincerely hope that this helps having the conversation via the support portal more efficiently.

Consulting and Supporting Sitecore Developer Community

Search Index Troubleshooting

Posted by admin On October - 30 - 2011

I have a rule of thumb. If I am being asked the same question twice a week, I am writing a blog post.
Today I have been asked the same question twice, so here you go.

I’ve blogged about search a lot, but one important thing still needs to be covered. Once you are convinced that going with the “new” search is the right way to go, you may have to deal with its configuration. On a two or more server environment, without proper configuration, the search index may not be rebuilt after publishing.

The main reason for that is the way this functionality is architected. In a distributed system with at least one Content Management (CM) and one Content Delivery (CD) instance index rebuild works similarly to the way caching worked in pre 6.3 days. The CD instance maintains its own copy of search index and does not know anything that happened on the CM side (publishing).

Your job is to make sure it does.

First of all, as the documentation suggests, make sure you have the following:

0. Make sure that the application pool account has read/write/modify over the /data/indexes folder or other location where you have indexes stored (thanks for the hint, Joel).

1. HistoryEngine is enabled on the web database*

   1: <database id="web" 

   2:    <Engines.HistoryEngine.Storage>

   3:       <obj type="Sitecore.Data.$(database).$(database)HistoryStorage, Sitecore.Kernel">

   4:          <param connectionStringName="$(id)"/>

   5:          <EntryLifeTime>30.00:00:00</EntryLifeTime>

   6:       </obj>

   7:     </Engines.HistoryEngine.Storage>

   8:

   9: </database>

* This needs to be done on both CM and CD side.

You may also have a number of “web” databases configured, “stage-web”, “pub-web”, “prod-web”, etc. As the names of the databases may be different from one environment to another, you need to apply this to the “web” database you use to deliver content in production.

2. The update interval setting is not set to “00:00:00” as this disables the live index rebuild functionality completely:

<setting name="Indexing.UpdateInterval" value="00:05:00"/>

If this is set to the following default value, this means that the remote server will check if anything needs to be added into the index every 5 minutes. This should be taken into account. Everything may be working, but you may be experiencing the delay in the rebuild process, which may cause confusion. Feel free to adjust it to a shorter timeframe. Perfect timing depends on the environment, frequency of content change, etc. In my experience, I would not set it to anything less than 30 seconds.

3. Enable “Indexing.ServerSpecificProperties” in web.config:

<setting name="Indexing.ServerSpecificProperties" value="true"/>

In most cases, you need this value to be set to “true”. Specifically, this is needed in the following cases which apply to most installations:

- more than one CD server in a web farm
- CM environment points to the same physical web database as the CD environment.

In a clustered CM environment this setting is overridden and set to “true” automatically due to the EventQueues functionality that has to be enabled in such case.

If this setting is set to “false” and you have one of the configurations mentioned above, the CD server(s) will never know that it needs to update the indexes.
After each index update operation, Sitecore writes a timestamp to the Properties table of the currently processed database. This helps the IndexingProvider, that is responsible for index update process, understand what items to pull out from the history table when doing next index update. With “Indexing.ServerSpecificProperties” set to “false”, the timestamp is not unique to the environment, so you may be having an issue when CD is confused regarding what items to process from the history store.

image

The instance name can either be explicitly set in the web.config or created from a combination of the machine name + site name. This grants the uniqueness of the key within an environment.

4. Check your index configuration.

4.1 Your search index configuration in CD may be referencing the “master” database instead of “web”.

4.2 Check if the root the index is configured to be pointing to actually exists in the “web” database:

   1: <search>

   2:          <configuration>

   3:             <indexes>

   4:                <index id="test" type="Sitecore.Search.Index, Sitecore.Kernel">

   5:                   <param desc="name">$(id)</param>

   6:                   <param desc="folder">test</param>

   7:                   <Analyzer ref="search/analyzer" />

   8:                   <locations hint="list:AddCrawler">

   9:                      <master type="...">

  10:                         <Database>master</Database>

  11:                         <Root>/sitecore/content/test</Root>

4.3 If you are leveraging template filters within the configuration, make sure that every tag within the <include /> section should be unique as it is used as a key:

<include hint="list:IncludeTemplate">
         <residential>{71D42CF2-CE89-4030-9EB1-0065B35B78C4}</residential>
         <business>{ED9F466B-D436-4A3F-B22F-EA6E8097085D}</business>
         <industry>{78166FE4-EDFB-4B0D-A3ED-860AEB44CD40}</industry>
</include>

Otherwise only the last item is getting into the filter if you define it like this:

<include hint="list:IncludeTemplate">
                <template>{71D42CF2-CE89-4030-9EB1-0065B35B78C4}</template>
                <template>{ED9F466B-D436-4A3F-B22F-EA6E8097085D}</template>
                <template>{78166FE4-EDFB-4B0D-A3ED-860AEB44CD40}</template>
</include>

If you went through all these steps and still can’t get the indexing to work, here is what you can do.

Since there are a few things that can go wrong, we need to rule out “live indexing” functionality that relies on history store and update intervals and the index configuration itself.

To find out whether your index is properly configured at all, follow these steps to run a full index rebuild process on the CD side.

1. Download this script and copy it to the /layouts folder of your CD instance.

2. Execute it in the browser by going to http://<your_site>/layouts/RebuildDatabaseCrawlers.aspx

3. Toggle the index you want to rebuild and hit rebuild.

This will launch a background process so there will be no immediate indication whether the index is rebuilt or not. I suggest looking into the log file to confirm this actually worked.

If you do not see your custom index in the list, this means that your index is not properly registered in the system. This is a configuration problem. Review your configuration files and make sure the index is there.

If after the index is fully rebuilt, you start getting hits and the search index contains expected number of documents (you can use either IndexViewer or Luke to confirm that), then the index itself is configured properly and what you need to make sure is that the “live indexing” portion works right.

In order to do that, follow these steps:

1. Login to CM instance.

2. Modify an item (change the title field for ex.) that you know is definitely included into the search index.

3. Save.

4. See if the item change got reflected within the index on the master/CM side.

5. Publish.

6. Verify that the item change got published and cache cleared.

7. Within SQL Management studio query the History table of the web database:

SELECT Category, Action, ItemId, ItemLanguage, ItemVersion, ItemPath, UserName, CreatedFROM [Sitecore_web].[dbo].[History] order by created desc
image

You should be able to see a few entries related to your item change.

8. Now query the Properties table of the Web database:

SELECT [Key], [Value] FROM [Sitecore_web].[dbo].[Properties]
image

You should see two “IndexProvider” related entries for each of the environments.
Note that the actual key names could be different, depending on your configuration.

As previously indicated, these UTC based timestamps help IndexingProvider understand what items to pull out from the history table when doing next index update.

So naturally, the timestamp for the CD environment should be later than the one for CM.

If you do not see an entry for the CD environment, then something is wrong with the configuration. Double check the UpdateInterval setting, history table and index configuration.

9. Open up the most recent log file on CD and look for the following entries:

ManagedPoolThread #12 16:39:58 INFO Starting update of index for the database ‘web’ (1 pending).
ManagedPoolThread #12 16:39:58 INFO Update of index for the database ‘web’ done.

These entries indicate that the IndexingProvider was kicked in and processed the changed items (1 in this case). The item should be in the physical index file as document now.

If you do not see these messages, then something is wrong with the actual crawler piece. Look out for any exceptions that appear in this timeframe. The DatabaseCrawler component may not be processing your items properly. So you may have to override it and step into the code to figure out what’s going on.

10. Finally, as a final checkup, take a deep look into the search index files themselves.

The following tools will help you browse the contents of the index and search:

If you get through this checklist and reading this, my hope is that your search is already working properly.

Consulting and Supporting Sitecore Developer Community

To upgrade or not to upgrade * updated

Posted by admin On October - 30 - 2011

Greetings!

One of our partners asked me yesterday about my thoughts on upgrading. Whether Sitecore recommends upgrading to 6.4 as of now or not. Also, just stumbled upon this great discussion here on Kim Hornung’s blog!

This is quite an interesting and thought provoking question, and I don’t think there could be a single answer to that and I also think that Sitecore has been doing a great job not forcing customer’s to upgrade. At the end of the day, it is your customer’s requirements and expectations that should drive the decision. With Sitecore’s successful hotfix process, if you have an issue that is a showstopper, you can request a quick hotfix from the Customer Service rather than upgrading your whole infrastructure!

upgrade decision treeHere is a decision tree that encompass everything that I generally suggest to customers and partners.

Click on the image to expand.

Please note that this is not an official recommendation from Sitecore. Rather, these are my personal thoughts on the subject.

With 6.3.1 being recommended, I’ve updated the image.

Consulting and Supporting Sitecore Developer Community

Disable WebDAV in Sitecore

Posted by admin On October - 30 - 2011

If you are not sure what WebDAV is, please refer to this document on Sitecore Developer Network.
Briefly, quoting this doc:

WebDAV allows users of Web clients such as browsers to manage files on Web servers using Web protocols such as HTTP or HTTPS. With WebDAV, users can drag-and-drop files between the Windows desktop and the browser.

I would recommend disabling this feature on the Content Delivery side as WebDAV is not expected to be used there.

It also makes sense disabling this feature on the CMS side if you are not planning on leveraging this feature at all. This will reduce the number of log files written to the /data/logs folder and get rid of the errors in the main log files generated if WebDAV is misconfigured.

Here are the steps:

1. Remove WebDAV config references within <log4net />:

   1: <log4net> 

   2: <appender name="LogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging"> 

   3: <file value="$(dataFolder)/logs/log.{date}.txt" /> 

   4: <appendToFile value="true" /> 

   5: <layout type="log4net.Layout.PatternLayout"> 

   6: <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" /> 

   7: </layout> 

   8: </appender> 

   9: <!--<appender name="WebDAVLogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging"> 

  10: <file value="$(dataFolder)/logs/WebDAV.log.{date}.txt" /> 

  11: <appendToFile value="true" /> 

  12: <layout type="log4net.Layout.PatternLayout"> 

  13: <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" /> 

  14: </layout> 

  15: </appender>--> 

  16: <root> 

  17: <priority value="INFO" /> 

  18: <appender-ref ref="LogFileAppender" /> 

  19: </root> 

  20: <!--<logger name="Sitecore.Diagnostics.WebDAV" additivity="false"> 

  21: <level value="INFO" /> 

  22: <appender-ref ref="WebDAVLogFileAppender" /> 

  23: </logger>--> 

  24: </log4net> 

2. Remove WebDAV config references within <system.webServer />:

   1: <!--<remove name="WebDAVModule" />-->

   2:  

   3: <!--<add name="WebDAVRoot" path="*" verb="OPTIONS,PROPFIND" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />

   4: <add name="WebDAVRoot64" path="*" verb="OPTIONS,PROPFIND" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />

   5: <add verb="*" path="sitecore_webDAV.ashx" type="Sitecore.Resources.Media.WebDAVMediaRequestHandler, Sitecore.Kernel" name="Sitecore.WebDAVMediaRequestHandler" />-->

3. Remove WebDAV config references within <httpHandlers>/>:

   1: <!--

   2: <add verb="*" path="sitecore_webDAV.ashx" type="Sitecore.Resources.Media.WebDAVMediaRequestHandler, Sitecore.Kernel" />

   3: -->

4. Finally, you can delete the Sitecore.WebDAV.config file from webroot/App_Config/Include.

There you go!

Consulting and Supporting Sitecore Developer Community

My Dreamcore Presentation

Posted by admin On October - 30 - 2011

Dreamcore is just around the corner and I am fully immersed in my presentation.
The topic is “Building Successful and Efficient Multilingual Solutions with Sitecore”.

My plan is to spend a few minutes showing the fundamentals of multilingual support in Sitecore and then drill down into the use cases and some real world scenarios I’ve witnessed over a few years.

I believe this format will be suitable for the beginners who are thinking about a multilingual implementation and also for the experienced folks as I have a few secret tricks up my sleeve!

If there anything specific you would expect from my presentation, please keep the comments coming.

By the way, full Dreamcore 2011 agenda can be found here:
http://www.sitecore.net/en/Events/Dreamcore2011/Agenda.aspx

Hope to see you there!

Consulting and Supporting Sitecore Developer Community

Sitecore User Group in San Francisco / Bay Area

Posted by admin On October - 30 - 2011

I would like to announce the formation of the first and only Sitecore User Group in the Bay Area.

My vision is to create a dedicated community for passionate Sitecore developers and end users devoted to learning new things and sharing experience about everything related to Sitecore CMS. Anybody can join. You can be either a beginner or experienced Sitecore developer, or end user.

Since Sitecore USA is headquartered in San Francisco, you have an amazing opportunity to get new information about the product directly from the vendor and get to meet the Sitecore folks!

The user group’s home is here. Join us!

Consulting and Supporting Sitecore Developer Community