Monday, December 01, 2008 Login    Register

 


  Search Blog  
  Blog Listing  
  Blog Archive  
Default banner
  DotNetNuke Skinning - Error: Could Not Load Skin  
Location: BlogsThe Mighty Blog    
Posted by: Will Strohl 4/16/2007
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.

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!

Copyright ©2007 Will Strohl
Permalink |  Trackback

Comments (2)   Add Comment
Re: DotNetNuke Skinning - Error: Could Not Load Skin    By Jessica on 11/12/2008
Wow, you make it sound so simple! Lol. I'm having the same problem, but can't find the messed up code. Help?!<br><br><%@ Control language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %><br><%@ Register TagPrefix="dnn" TagName="USER" Src="~/Admin/Skins/User.ascx" %><br><%@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" %><br><%@ Register TagPrefix="dnn" TagName="SOLPARTMENU" Src="~/Admin/Skins/SolPartMenu.ascx" %><br><%@ Register TagPrefix="dnn" TagName="LEFTPANE" Src="~/Admin/Skins/leftpane.ascx" %><br><link href="<%= SkinPath %>skin.css" rel="stylesheet" type="text/css" /><br><table width="800" border="0" cellspacing="0" cellpadding="0" height="100%" align="center"><br> <tr><br> <td height="350" align="left" valign="top"><br> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"><br> <tr><br> <td align="left" valign="top" width="800" height="237"><img src="<%= SkinPath %>images/topup.jpg" width="800" height="237"></td><br> </tr><br> <tr><br> <td align="right" valign="top" width="800" height="113" background="<%= SkinPath %>images/topbottom.jpg" style="background-repeat:no-repeat; background-position:left top"><table border="0" cellspacing="0" cellpadding="0" height="100%"><br> <tr><br> <td align="left" valign="top"></td><br> </tr><br> <tr><br> <td height="25" align="right" valign="middle" style="padding-right:30px"><dnn:USER runat="server" id="dnnUSER" cssclass="usercss" />&nbsp;&nbsp;<dnn:LOGIN runat="server" id="dnnLOGIN" cssclass="usercss" /></td><br> </tr><br> </table></td><br> </tr><br> </table></td><br> </tr><br> <tr><br> <td width="100%" height="100%" align="left" valign="top"><br> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"><br> <tr><br> <td height="100%" width="242" align="left" valign="top" bgcolor="#A4A4A4" background="<%= SkinPath %>images/menubottombg.jpg" style="background-repeat:no-repeat; background-position:right bottom"><br> <table width="242" height="100%" border="0" cellpadding="0" cellspacing="0" background="<%= SkinPath %>images/menutopbg.jpg" style="background-repeat:no-repeat; background-position:right top"><br> <tr><br> <td align="left" valign="top" style="padding-top:10px"><dnn:SOLPARTMENU runat="server" id="dnnSOLPARTMENU" display="vertical" menueffectsmouseoverdisplay="none" menueffectsmenutransition="AlphaFadeBottomRight" cleardefaults="true" mouseouthidedelay="300" usearrows="false" userootbreadcrumbarrow="false" usesubmenubreadcrumbarrow="true" rootmenuitemcssclass="RootMenuItem" rootmenuitembreadcrumbcssclass="RootMenuItemHover" rootmenuitemselectedcssclass="RootMenuItemSel" Rootmenuitemactivecssclass="MainMenu_TabMenuItemSelHover" menuitemselcssclass="MainMenu_MenuItemSel" submenucssclass="Submenu" submenuitemselectedcssclass="Submenuitemselected" submenuitembreadcrumbcssclass="Submenuitembreadcrumb" /></td><br> </tr><br> <tr><br> <td class="leftpane" id="leftpane" runat="server"></td><br> </tr><br> </table><br> <br> <td height="100%" align="left" valign="top" bgcolor="#EC8DA1" background="<%= SkinPath %>images/bottompp.jpg" style="background-repeat:repeat-x; background-position:left bottom"><br> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><br> <tr><br> <td width="14" align="left" valign="top" height="100%"><br> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"><br> <tr><br> <td height="301" align="left" valign="top"><img src="<%= SkinPath %>images/middlefttop.jpg" width="14" height="301"></td><br> </tr><br> <tr><br> <td align="left" valign="bottom" height="100%" bgcolor="#EC8DA1"><img src="<%= SkinPath %>images/middleftbottom.jpg" width="14" height="252"></td><br> </tr><br> </table><br> </td><br> <td align="left" valign="top" height="100%" bgcolor="#DA4F66" background="<%= SkinPath %>images/midbottombg.jpg" style="background-repeat:repeat-x; background-position:left bottom"><br> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" background="<%= SkinPath %>images/middtop.jpg" style="background-repeat:no-repeat; background-position:left top"><br> <tr><br> <td height="100%" align="left" valign="top" background="<%= SkinPath %>images/middrighttop.jpg" style="background-repeat:no-repeat; background-position:right top"><br> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" background="<%= SkinPath %>images/middbottom.jpg" style="background-repeat:no-repeat; background-position:left bottom"><br> <tr><br> <td align="left" valign="top" class="toppane" id="TopPane" runat="server"></td><br> </tr><br> <tr><br> <td align="left" valign="top" height="100%" class="contentpane" id="ContentPane" runat="server"></td><br> </tr><br> </table></td><br> </tr><br> </table><br> </td><br> <td width="170" height="100%" align="left" valign="top" background="<%= SkinPath %>images/rightbottom.jpg" style="background-repeat:no-repeat; background-position:left bottom"><br> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" background="<%= SkinPath %>images/righttop.jpg" style="background-repeat:no-repeat; background-position:left top"><br> <tr><br> <td align="left" valign="top" class="rightpane" id="RightPane" runat="server"></td><br> </tr><br> </table><br> </td><br> </tr><br> </table><br> </td><br> </tr><br> </table><br> </td><br> </tr><br> <tr><br> <td height="33" align="left" valign="top" background="<%= SkinPath %>images/bottombg.jpg" bgcolor="#000000" style="background-repeat:no-repeat; background-position: left top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"><br> <tr><br> <td align="left" valign="top" class="bottompane" id="BottomPane" runat="server"></td><br> </tr><br> </table></td><br> </tr><br></table><br><br>

Re: DotNetNuke Skinning - Error: Could Not Load Skin    By wills on 11/12/2008
Hey Jessica, can you e-mail me your code at: will(dot)strohl(at)gmail(dot)com


Your name:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 
© Copyright 2004-2008 by Will Strohl. All rights reserved.