Posts

Is Rendered Item Valid XHtml Document Could not find schema information warnings during publish item Sitecore 7.2

Image
Note: Since we now live in the HTML5 world, the simple resolution to any XHtml validation errors is to remove the XHtml validation rules on  System->Settings->Validation Rules->Global Rules item. Sitecore should update it's validation rules to be relevant to HTML5. This make the rest of this post obsolete :). I created a simple approval workflow in Sitecore 7.5 and tried to approve an item for publishing and found a bunch of validation errors in the Validation Results. Most of them were related to the "Is Rendered Item Valid XHtml Document" section which looked like this: The problems were related to violations of the W3C HTML5 recommendation An important note here is: The element containing the character encoding declaration must be serialized completely within the first 1024 bytes of the document. Adding the following xmlns attribute to the Html tag fixed most of the errors: <html lang="en" xmlns="http://www.w3.org/1999/...

'analytics' connection string is not defined

Typically developers run into this error in their local environment if they do not have Sitecore Analytics enabled but for some reason have a Sitecore.Analytics.config deployed with the following settings enabled: <!--  ANALYTICS DISABLE DATABASE             Disables the database so that no reading or writing to the database occurs.             Default: false       -->       <setting name="Analytics.DisableDatabase" value="false" /> <!--  ANALYTICS ENABLED             Determines whether analytics is enabled or not.             Default: true       -->       <setting name="Analytics.Enabled" value="true" /> Simply disabling the Analytics DB by setting the Analytics.DisableDatabase to "true" solved the problem. Here is a related blog post about this error.

System.ArgumentException: Empty strings are not allowed. Parameter name: connectionString at Sitecore.Analytics.Data.DataAccess.DataAdapters.Sql.SqlServer.SqlServerDataAdapterProvider..ctor()

Recently one of my developers ran in to the following error when previewing a field of the type "Mutlilist with Search"  in content editor in Sitecore 7.2: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.---> System.ArgumentException: Empty strings are not allowed. Parameter name: connectionString at Sitecore.Data.SqlServer.SqlServerDataApi..ctor(String connectionString) at Sitecore.Analytics.Data.DataAccess.DataAdapters.Sql.SqlServer.SqlServerDataAdapterProvider..ctor() --- End of inner exception stack trace -- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sitecore.Reflection.ReflectionUtil.CreateObject(Type type, Object[] parameters) at Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[]...

Exception Info: Lucene.Net.Index.MergePolicy+MergeException

While trying to convert items into buckets, my w3wp process started crashing randomly. Looking at the Event Viewer I saw the following error: Application: w3wp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: Lucene.Net.Index.MergePolicy+MergeException Stack:    at Lucene.Net.Index.ConcurrentMergeScheduler.HandleMergeException(System.Exception)    at Lucene.Net.Index.ConcurrentMergeScheduler+MergeThread.Run()    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)    at System.Threading...

TDS Build Error Unable to copy file "\bin\**\*.*" to "\Website\*.*". Illegal characters in path. C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets

Image
Working with Sitecore 7.2 and TDS 5.0 I recently started noticing the following error after syncing or using Sitecore Rocks to update TDS using the TDS connector: Error Unable to copy file "<project path>\bin\<profile name>**\*.*" to "<inetpub path>\Website\*.*". Illegal characters in path. C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets Solution: Always end the Build Output Path with '\'in the TDS project properties. Here is the funny part, I tried fixing it by making the same change to the MS Build script used by TDS but then it would take forever to load the TDS project in VS. Contacted Hedgehog support for the resolution and that is what they came back with. 

Loaded unexpected element while trying to get rendering html from server. Expecting last tag to be closing script marker

Image
If you have googled this error before, the most promising result is this  article . Now this article does a good job of explaining what <code> elements are to the page-editor and their connection with this error and also proposes a solution that may or may not be the cause of the issue, in my case it wasn't. Here is what my issue was: Working with Sitecore MVC view renderings A page has view renderings within nested placeholders, e.g. a hero slide item added to a hero slide item container with a placeholder (say hero-container), which in turn is added to the body of the page using another placeholder (say main-content). Using page editor, tried adding a new component to the leaf placeholder (say hero-container), and got the first popup for the allowed controls (if the field is populated) Once the component is selected and clicked Ok, nothing happens. Looking at the console I saw the following: (I recommend you click on the link to the .js file and checkout the ...

Structuring Content Within A Site In Sitecore

Recently, in a discussion with the team regarding how to structure content in Sitecore brought up some very interesting theories which I thought would be useful to share. So, my theory was that enterprise content should be grouped reflecting the business structure, as I discuss it here ) and taking it one step further, using the same logic to structure content within a site. But this idea was promptly met with rejection. The counter theory offered was that the content should actually follow navigation paths used by visiting user personas. This immediately brought to light a rather large assumption:       Do we assume that the content tree structure in Sitecore dictates the navigation paths for end users? The answer is, not necessarily. In my view, the minimum requirement should be to facilitate logical grouping of content that always avoids content duplication. I think there are two primary ways of implementing navigation paths: Create navigation components such as Primar...

Enterprise Inheritance and Content Hierarchy

Image
This post is my humble attempt to share what I have discovered from my experience to be a best practice in implementing IA (Information Architecture) and content hierarchy for an enterprise implementing manage sites within a single Sitecore instance. As this is my first Sitecore blog, not to mention my first blog post ever, please feel free to comment and critique my approach as I attempt to contribute to the incredibly talented Sitecore developer community. So let’s just jump into it, consider the following scenario: an enterprise has just acquired Sitecore as their CMS platform and wants to strategize on how they should implement IA and content hierarchy so that they maximize reuse and have a Sitecore instance that scales really well. It is unsurprisingly common for businesses to decide to manage the entire company’s content within a single Sitecore instance and why not, since this is one of the easiest selling points for Sitecore, “Buy a single instance and you can build any many we...