Monday, December 19, 2011

Installing Sitecore with PowerShell


I have more than 30 Sitecore instances on my laptop, and I often need to have a clean of a specific version/revision of the product done quick.

With all the love PowerShell is having around Sitecore community, I have dreamed up a quick install script that performs the following actions:

Sunday, November 27, 2011

Hidden Gem of Sitecore Page Editor


During performance profiling of Page Editor I’ve noticed that the “My Items” button was taking a lot of CPU time to render. ANTS Performance Profiler was very kind to tell me that with no hesitation.

Friday, November 11, 2011

Sitecore Analytics Database Manager


Great news! Our brilliant engineers from the Customer Service Department developed a very useful and, I would say, critically important tool that helps Sitecore administrators in maintenance activities on the OMS 1.x database.

Monday, October 31, 2011

Sitecore Virtual User Group Recording


A bit over a week ago I had a pleasure speaking at the Sitecore Virtual User Group, here is the recording for the ones who missed it.

My Sitecore Virtual User Group Presentation

I will be following up with a blog post series containing some of the code samples.

Let me know what you think!

Monday, October 17, 2011

Sitecore Media Library Performance Optimization Checklist


Here is a quick checklist that you can use in order to get more performance out of your Sitecore Media Library’s delivery.

Friday, October 14, 2011

Upcoming Sitecore Users’ Virtual Group


Exciting news! I was invited to present at the upcoming Sitecore Users’ Virtual Group which will be held next week on Wednesday (Oct 19th) at Noon Pacific, 3:00 PM Eastern, 8:00 PM UK. Thanks guys!
So the topic would be quite random, “Latest cool prototypes from Sitecore US lab”. Since I am not in product development, rather “on-the-field” kind of Sitecorian, don’t expect any of the new MVC, Sitecore 7, but expect the demos of the following components produced for the customer needs I witness during my consulting engagements with partners and customers:
- Updates on the following two hottest modules produced. Both contain some major enhancements based on your feedback (thank you)!
Sitecore.Search extension aka AdvancedDatabaseCrawler
Partial Language Fallback
- Other prototypes and super experimental stuff like ContentSilo, NameValueEx field, WorkflowBundle and more (if we have time)!
If this sounds interesting, see this event page for more details and click here to register. Space is limited.
Hope it will be informative and fun! See you soon.

Tuesday, October 11, 2011

Changing Field Sharing Settings in Sitecore


So I’ve been working on a C# script which job is to change field value sharing settings on a Sitecore template field from Versioned to Shared, something you can do in the Template Manager application by checking the Shared checkbox and saving.

Wednesday, September 07, 2011

Sitecore North America Technical Insider Call


top secret folderSitecore USA will be conducting a brief 30 minute call for Sitecore Certified Developers tomorrow at 10 AM Pacific. Here is what we will be covering:
- Some quick announcements
- State of the Union on Sitecore recommended version (new stuff)
- Sneak preview of the brand new and completely awesome Data Access Training
- Update to Search Extension Shared Source Project aka AdvancedDatabaseCrawler v2

Friday, August 26, 2011

Unapproved content gets published [Friday Case]


Today in a Friday Case category, which features support cases causing to pull my hair out, a very interesting issue I’ve had with a customer reporting that unapproved content was going live quite unexpectedly.
After witnessing the issue with my own eyes when an item just created and not pushed via workflow was magically showing up in production after a few minutes, I decided to investigation Sitecore configuration. This revealed a PublishAgent that was enabled to run frequently, but nothing else.

Wednesday, August 24, 2011

Partial Language Fallback Module Update


Today I pushed a small update to the Partial Language Fallback module which I introduced a while back. Check out this quick screencast below. For the full list of changes hit “read more”.
image

Friday, August 19, 2011

Sitecore Output Caching: Kick it up a Notch


image Ever wondered how Sitecore caches works? It is pretty cool, actually. Sitecore can cache the output of any presentation component that it is aware of (Sublayout, WebControl, XSL Rendering). Basically, this output may vary on data context (Context Item or Datasource), device, whether user is logged in or not, parameters passed to the rendering, query string and Context user:
This gives a ton of options and in most cases this is sufficient, but what if the output of your rendering depends on inner logic embedded within the control? Sometimes you could solve this with VaryByParm and by passing different parameters to the rendering, but what if that’s not the case?
This is exactly the use case I have been presented during another onsite visit with a customer.
Here is a very simple way of extending the cache variation logic for a Sublayout.

Monday, August 01, 2011

Web Forms File Upload: 2 Exceptions [Common Errors]


If you are having trouble with the File Upload field within the Web Forms for Marketers module, specifically the form submission fails with a generic error, check your Sitecore log file. If you see either of the following two exceptions, there is a solution! Read on.

Saturday, July 30, 2011

Sitecore Developer Network Search just got a bit better


We just pushed an update to the SDN search, which included greatly enhanced search within Sitecore Community Blogs, and integrated SDN Forum. Now you should be able to search against any Sitecore resource from one place!

image

Among other enhancements, we’ve improved search relevancy by tweaking a few settings and ignoring landing pages.

Hope you see the difference.

Feel free to provide feedback, especially if your own blog is not getting indexed by us.

Enjoy!

Thursday, July 07, 2011

Windows Authentication for Sitecore. Repost


Back in 08 I posted this walkthrough on how to configure Sitecore to use Windows Authentication for SQL connection and effectively remove the username and password from the connectionStrings.config file.
Here is a quick repost of the walkthrough with a few tweaks for SQL 2008 / Windows 2008 (R2) and Sitecore 6.4.x/6.5 (some steps are not required any more):

Monday, June 13, 2011

Old Search is deprecated in Sitecore 6.5


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.

Thursday, June 02, 2011

Sitecore USA is looking for more brain power


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.

Monday, May 16, 2011

Sitecore Users Virtual Group


If you guys have not seen this initiative, check it out: http://www.sitecoreug.org

The Sitecore Users' Virtual Group is dedicated to supporting the Sitecore community wherever they exist across the globe. There are some great speakers lined up for our first sessions and all sessions are free of charge and conducted over the web. Here is the schedule.

The first presentation will take place next Wednesday, May 18, at 9:00 AM Pacific, Noon Eastern, or 5:00 PM UK time. John West, CTO of Sitecore North America, will discuss the state of Sitecore and the CMS marketplace. John has graciously agreed to answer your questions.

If you would like to attend, please register here.

Monday, May 09, 2011

Sitecore Support: Help us help you!


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!

Thursday, May 05, 2011

Teach Sitecore to ignore a directory


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!

Monday, May 02, 2011

How to verify HTML cache is working


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.

Wednesday, April 27, 2011

Search Index Troubleshooting


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.

Thursday, April 14, 2011

My Dreamcore Presentation


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!

Wednesday, April 13, 2011

Disable WebDAV in Sitecore


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.

Wednesday, February 09, 2011

To upgrade or not to upgrade * updated


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.

Friday, February 04, 2011

New Year, New Sitecore Blog


I have been thinking about this for a while, and finally decided to create another Sitecore blog on our Community area dedicated to sharing my experiences in the field working closely with implementation partners:

http://www.sitecore.net/AlexShyba

My ambitious plan is too continue sharing anything deeply technical here while the new blog would be a place where technical meets business half way.

Hope you enjoy it!

Thursday, February 03, 2011

Sitecore User Group in San Francisco / Bay Area


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!

Wednesday, February 02, 2011

8 Reasons to Use New Search in Sitecore


Greetings,
Back in 2010 at the first Dreamcore conference, I was honored to present on two topics: ”Data Retrieval Techniques with Sitecore” and “Using Lucene.NET with Sitecore”.
If you have not seen any of those, download the slides and check them out. I consider myself being a data guy, so that’s why I really enjoyed presenting on these topics. Not sure why, but I love everything about data access, and absolutely adore what Microsoft did with Entity Framework 4, especially the oData stuff. There is something truly exciting in seeing your data flow and materialize in one shape or another.
Anyways, back to the topic. During my presentation on Lucene/Sitecore marriage, I was showing that Sitecore actually has two (!!!) implementation of Lucene.NET. One is a legacy, what we call “old” search. Everything within Sitecore.Data.Indexing namespace is considered to be “old” search. It is configured and implemented differently, though it uses the same Lucene.NET dll. There is also the “new” search which is represented by a few classes within Sitecore.Search namespace.

Tuesday, February 01, 2011

Sitecore Product URLs Amazon Style


If you are a Sitecore CMS developer and you love shopping on Amazon, you probably had the same thought: what would it take to re-create Amazon.com in Sitecore? Completely from scratch. Ok, maybe it’s just me.

Monday, January 31, 2011

Dreamcore is going to be even more fun this year!


What could be more fun than meeting your fellow Sitecore Enthusiasts and visiting beautiful Boston, especially in springtime? Learning about what’s new coming out, share ideas and best practices.
Well, you must have heard, we are doing it again!

As we still working hard on the agenda, but here are two known facts:

1. Yes, I will be speaking about common implementation scenarios. Specifics are coming soon.

2. Now exclusive information…just overheard it in the corridors of the marketing department.

This time we are going to have a special guest speaker: Carl Franklin!
In the world of technology, you know Carl as one of the first VB programmers, an extra famous Microsoft enthusiast, and of course, a founder and co-host of .NET Rocks!, an Internet audio talk show for people like you an me.

Again, specifics will be coming later, but rest assured that Carl’s inspirational message will leave no doubt that .NET Rocks! Along with that, we will be doing our own part, and show you exactly why Sitecore Rocks!

It is going to be so much fun! See you all in Boston!

Dreamcore 2011 is coming April 19-20, 2011 in Boston. Sign up now!

Thursday, January 06, 2011

Color Picker Field for Sitecore


Here is a late Christmas present for the Sitecore community. A “ColorPicker” custom field that helps storing color codes in Sitecore.

The idea is simple: have a single line text box for color code storage and present the user with a good looking dialog to pick the color.

Technically speaking, there are two ways of color picking implemented.
The first approach is using native Internet Explorer’s color picker dialog and it is getting called via JavaScript.
The second one is using a custom built XamlSharp dialog with a ColorPicker control from ComponentArt. If you are using non IE browsers, the second dialog will be called.

Here is a short video about how it works. Turn those mics on!

Color Picker Module for Sitecore

Here are the installation steps:

1. Download the appropriate Sitecore package.
If you are planning on building the project yourself, use the “ColorPicker field items only” package.

2. Install it via Sitecore desktop.

3. After the installation, new custom field called “Color Picker” should be registered with the system.

To verify it, switch to “core” database and go to the following location: “/sitecore/system/Field types/Simple Types”

The “Color Picker” field should be there and should look like this:

clip_image001

Short user guide:

1. If the installation was successful, you can start using it.

2. Find the template you want to play with.

3. Create a field of type “Color Picker”

image

4. Create an item from this template.

5. Enjoy.

image

This shared source module has been implemented in collaboration with Artem Loboda (compent.dk).

Developed and tested on 6.4 Update-1. Expected to work with 6.3. There could be compatibility issues with earlier releases.

All the sources are published to our Shared Source Library. Thanks for the help, Jimmie :-)
http://trac.sitecore.net/ColorPicker/browser/Trunk