Will "the Mighty" Strohl

DotNetNuke Skinning - Error: Could Not Load Skin

In helping a colleague learn how to create and upload DotNetNuke skins, I ran into an error that I was not used to.  It was at first a bit frustrating until I stepped back and looked at it without rushing.

The exact error was:

Could Not Load Skin: [skin path] The server tag is not well formed.

This first struck me as odd since I have never seen it before, and because the server tags are inserted by DotNetNuke.  So, I thought, "Why hasn't this happened before?"

That was before I really thought about it.  The DotNetNuke server tags are NOT the problem.  If it was, it would certainly be a lot more consistent.

This immediately led me to the truth!  It must be a server tag that I created.  We do not create server tags in skins you say?  Yes we do!  (Think "panes".)  First of all, let me summarize this particular error by telling you that it will happen for 1 reason:

  1. The HTML is not well-formed:
    1. A HTML tag is missing a closing character (>)
    2. A HTML tag attribute is missing at least one double quote (")
    3. An opening HTML tag does not have a closing tag
    4. There is not a space in between tag attributes

This time, the error occurred because of reason #4.  Reason #4 is much more difficult to find because at first glance it will appear that the space is indeed there.  We normally do not even think about spaces.  We assume.  We instead look for mispelled, missing, or extra attributes and appropriate values.

Here is an example of what I ran into (SO SIMPLE!)...  This is a typical declaration of a ContentPane:

<td class="contentpane" colspan="4"id="ContentPane" runat="server"></td>

The previous example does not have the expected space prior to the ID attribute.  This will throw off the regular expression DotNetNuke skin conversion, as well as the .Net Framework parsing engine.

Fixed, it would normally look like this:

<td class="contentpane" colspan="4" id="ContentPane" runat="server"></td>

As you can see, it would be easy to over look this example, and three different editors DID NOT catch it (GoLive CS2, Dreamweaver 8, and Web Developer 2005 Express Edition)! 

I hope this helps at least one of you out there!

blog comments powered by Disqus