Parser Error won't go away.

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
12/8/2009 11:34:59 PM
Gravatar
Total Posts 6

Parser Error won't go away.

Hi All,

When working on theme.skin, a typo has caused a Parser Error.

The problem that I'm having is that even though I've fixed the typo, I can't access the site to upload the fixed version in the file manager, because every time I use VS to "rebuild" the site, it brings up the same error. At the moment I'm running MP locally using Visual Studio to build/test and MySQL (using WAMP) as my DB.

How can I get around this? I'm sure it's just a simple setting, but I'm stumped.

Cheers

Leadeye

12/9/2009 5:49:12 AM
Gravatar
Total Posts 18439

Re: Parser Error won't go away.

Themes are cached very heavily by the runtime. If touching the Web.config and re-compiling does not solve it try rebooting.

Note also that if running in full trust it will use the theme.skin file from your skin folder /Data/Sites/[SiteID]/skins/[skinname] but if running in medium trust it will use the one from /App_Themes/Default/theme.skin

I generally recommend not using theme.skin for styling because it causes inline styles in the page which bulks up the markup.

Hope it helps,

Joe

12/9/2009 5:24:55 PM
Gravatar
Total Posts 6

Re: Parser Error won't go away.

Hi Joe,

Thanks for the pointers. I'm always amazed at how hands-on your are in the forums.

Unfortunately though, rebuilding the site and rebooting my PC didn't seem to work. Is there a way that I can manually clear the "server" cache on my machine (running windows)?

Thanks,

Leadeye

12/10/2009 5:03:33 AM
Gravatar
Total Posts 18439

Re: Parser Error won't go away.

Hi,

The cache definitely does not survive a reboot, if the error remains then the file is still not correct. To be honest I have never seen this kind of problem caused by a theme.skin files, what makes you think that is the problem?

Usually those kind of errors indicate something malformed in Web.config file.

Please post the actual error message/detail.

Best,

Joe

12/10/2009 11:31:45 PM
Gravatar
Total Posts 6

Re: Parser Error won't go away.

The error message is below. I'm not really sure that Theme.skin is the problem, but the error that caused the problem initially was in the theme.skin file.

You can also find link to the web.config files at www.forestonline.com.au/web.config.txt.

 

Thank for your patience/persistence,

Leadeye

 

 

Server Error in '/FreshHotSmoked' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

 Parser Error Message: Literal content ('<asp:Menu Orientation="Horizonatal" />') is not allowed within a 'skin file'.

 Source Error:

 Line 2131: SelectedNodeStyle-VerticalPadding="1"

Line 2132: SelectedNodeStyle-Width=""

Line 2133: ShowCheckBoxes="None"

Line 2134: ShowExpandCollapse="true"

Line 2135: ShowLines="false"

 

Source File: /FreshHotSmoked/App_Themes/default/theme.skin Line: 2133

 Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

12/11/2009 8:08:01 AM
Gravatar
Total Posts 18439

Re: Parser Error won't go away.

Hi,

I was able to produce this error locally by adding this to the theme.skin file

<asp:Menu Orientation="Horizonatal" />

Note that unless you are running in Medium Trust, it is using the theme.skin file from

/Data/Sites/[SiteID]/skins/[skinname]

in my test this was

/Data/Sites/1/skins/andreasvicklund-02

But the error will still say it is happening in

/App_Themes/Default/theme.skin

because the runtime thinks that is where it is getting the file from but a VirtualPathProvider is actually serving it from the

/Data/Sites/[SiteID]/skins/[skinname] folder.

When I remove the invalid <asp:Menu Orientation="Horizonatal" /> it fixes the problem right away

You really should not try to style the menu using theme.skin because we are using CSSControlAdapters tomake it render different than a standard ASP.NET menu which would render as ugly nested tables by default.

Hope it helps,

Joe

12/12/2009 2:11:19 AM
Gravatar
Total Posts 6

Re: Parser Error won't go away.

Hi Joe,

That was the first thing I fixed. I've checked and I can't find any instance of the typo anywhere else. What I might try when I get back to work on Monday is creating a new instance of mojoportal, pointed towards a new database and just transfer across the files for the skin. I didn't have any much data in this one yet anyways.

I wasn't actually trying to style the site in the theme.skin file, I was just trying to debug the menu not showing up horizontally in my skin (which I managed to fix, right before I bricked the site).

I'm happy to consider it more or less case closed, but I'll try and post a note with the outcome regardless.

Many thanks,

Leadeye

12/14/2009 10:55:34 PM
Gravatar
Total Posts 6

Re: Parser Error won't go away.

Just an update for anyone who stumbles across this down the line.

I created a completely new mojoPortal install from scratch, copied the skin files from the error prone site above and applied it to the new site. All is working fine.

Obviously not an option for a fully-built and live site... but ok during development (for me anyway).

Adios Amigos

Leadeye

1/17/2010 6:24:40 PM
Gravatar
Total Posts 13

Re: Parser Error won't go away.

Hi,

in case it may give a way out from such situation.


Just came across the same pitfall, changing my skin with gotmono (http://www.carmel.com.sg/Data/skins/GotMono/). after reading the good comment by joe about it in the forum (http://www.mojoportal.com/Forums/Thread.aspx?pageid=5&mid=34&ItemID=4&thread=136&postid=449). I end up getting the parse error. when i checked the theme.skin from the specific skin, it was a bit of not quite good, tried to fix by updating it. in my case, i was not even able to log to the site, getting:

Parser Error Message: Literal content ('<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>Error 403</title><style type="text/css">body {font-family:"Verdana","DejaVu Sans",sans-serif;font-weight:normal;font-size: .7em;color:black;background-color: white}
p {font-family:"Verdana","DejaVu Sans",sans-serif;font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana","DejaVu Sans",sans-serif;font-weight:bold;color:black;margin-top: -5px}
h1 { font-family:"Verdana","DejaVu Sans",sans-serif;font-weight:normal;font-size:18pt;color:red }
h2 { font-family:"Verdana","DejaVu Sans",sans-serif;font-weight:normal;font-size:14pt;color:maroon }
pre,code {font-family:"Lucida Console","DejaVu Sans Mono",monospace;font-size: 0.9em,white-space: pre-line}
div.bodyText {font-family: "Verdana","DejaVu Sans",sans-serif}
table.sampleCode {width: 100%; background-color: #ffffcc; }
.error...') is not allowed within a 'skin file'.

Source File: /mojoportal/App_Themes/default/theme.skin Line: 1

not to kill more time, i just replaced it (although the error reports to app_themes default skin, it is actually the theme.skin file in the gotmono) with one of the default theme files. i was able to view the site and changed back to my previous working skin.

 

good luck

You must sign in to post in the forums. This thread is closed to new posts.