Sitecore Workflow XHTML Validation Issue - Solved
Sitecore has some handy and powerful validation capabilities. However, there is a validation rule that despite its good intent, will generally fail on newer websites.
If you use workflow in Sitecore and use the included Approve workflow step, it is setup to automatically validate for broken links and ensure that the content is correct XHTML. However, if you happen to be using HTML5 in your layout, say from HTML5 Boilerplate, this validation will fail. And there isn’t much you can do about it. The typical error message for the failed validation tends to look like this:
What to do? Well aside from changing your template markup, not much. While there may be “better” ways to solve this, the simplest solution is to just remove the validation rule. The trouble is, finding and removing the rules isn’t all that obvious - IMO.
This can be found under Sitecore > System > Settings > Validation Rules > Global Rules.
Select the “Global Rules” item and scroll down to the “Workflow” field. There you will find a rule in the right hand pane, called “Full Page XHtml” at the bottom of the list. Simply select this rule and remove it by pressing the left arrow button.
Now save and publish the “Global Rules” item and the validation error will no longer be run upon clicking Approve.
What is the Speed of Dark?
Knowing why is obsolesced by asking why…
A super-duper high res version is available here:
Mobile First for Responsive Design
Interested in Responsive Design? See why a mobile first approach is so important to getting it done right. In this presentation I look at both the why and the how, with examples, resources, and even some Q&A.
Adventures Beyond the Page Fold - Exploring UX Mythology
In this talk that I gave at StirTrek 2014, I discuss user experience myths that get in the way of good UX design. I address everything from the page fold, to 3 clicks from the home page, to faceted navigation and more!
I also kept the mic on for Q&A and took some questions from the audience.
FTP Publish Visual Studio Crash
One of the great things about Visual Studio 2012/2013 is the built-in publishing feature. It works great and now even supports Windows Azure. We have been using Web Deploy for a while which is a great way to push your site to a remote server.
However, in one of our older projects we had been using FTP publishing. It wasn’t as great as Web Deploy but it beat the heck out of manually moving code changes. So I went to open publishing on the project to push up some changes the other day and was met with a very discouraging result - Visual Studio crashed. Not on publish, but just by opening the publish dialog.
After trying various things and talking it over with a colleague, I decided to have a look at the publish profile XML document. This is typically located in a folder called “Properties\PublishProfiles” at the root of your project. Everything seemed OK, nothing stood out as wrong (info changed to protect the innocent):
<?xml version="1.0" encoding="utf-8"?>
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
But no matter what, trying to open the publish dialogue always resulted in a crash. Searching the web yielded few clues and the event log was cryptic.
Application: devenv.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException Stack: at System.Uri.get_Scheme() at Microsoft.VisualStudio.Web.Publish.LegacyFtpPublishProfile.IsUrlValid(System.String ByRef) at Microsoft.VisualStudio.Web.Publish.LegacyPublishProfile.GoodForFilePreviewOrTestConnection(System.String ByRef) at Microsoft.VisualStudio.Web.Publish.PublishDialogStaging.SetupDefaultTABStatus(Microsoft.VisualStudio.Web.Publish.UIPublishProfile) at…
So I just deleted the profiles and tried to recreate them from scratch. This resulted in more strange behavior. I verified the connection info by simply FTPing into the server so I was sure it was correct. But when I tried to test the connection, I got the error: “This operation is not supported for a relative uri.”
From that point on, I could no longer edit the values in the publish dialog and typing just edited the .CS file that was open in the background. I finally noted that the text box where I entered the IP address indicated in the example to prefix with ftp://
So I added “ftp://” to the IP and, boom goes the dynamite, it worked.
Seems like this is an errant bug in Visual Studio. You can also fix this by prefixing the IP in your XML settings file with “ftp://” for the profile in question. Hopefully they will address it but though I advocate using Web Deploy and to avoid FTP Publish, if you have a legacy project, hopefully this post helps you!
Americans use 13 billion pounds of paper towels every single year.
If each of us used only one paper towel per day, we would save 571,230,000 pounds of paper. That’s a lot of trees.
So, think we can do that? Watch and learn, folks.
Step one: Wet your hands.
Step two: Shake your hands…
Travel to Jupiter and beyond!