Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • George 28 posts 71 karma points
    Jul 04, 2011 @ 06:59
    George
    0

    All XSLT files suddenly giving "error parsing XSLT file"

    I have a site which is currently working fine in my dev environment.

    Over the weekend, the version of the site on the clients production environment mysteriously broke, and now all of my XSLT files are giving "error parsing XSLT file" - as in, every single XSLT file is giving this error.

    I tried "?umbdebugshowtrace=1" and my XSLT files all give me:

    Value cannot be null.
    Parameter name: key
    Value cannot be null.
    Parameter name: key
      at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
      at System.Collections.Generic.Dictionary`2..ctor(IDictionary`2 dictionary, IEqualityComparer`1 comparer)
      at umbraco.macro.GetXsltExtensions()
      at umbraco.macro.AddMacroXsltExtensions()
      at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters)
      at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)

    The client noticed this occuring Monday morning. I certainly wasn't doing anything to the site over the weekend, and the client swears that neither he nor his staff touched the site over the weekend either.

    I diff'd the live XSLT files with the (working) XSLT files in dev, and there's no change.

    Also of interest might be that the published XML cache (umbraco.config?) was "broken". Every site link bar the home page was giving a 404, and the Umbraco backend showed only the "home" (root) document. "Republish all content" fixed that error, but not the problem of the XSLT files all crashing.

    Any ideas for how to fix this? Is there anything I can do to further debug the problem?

  • George 28 posts 71 karma points
    Jul 04, 2011 @ 07:09
    George
    0

    I went through all of my macros in the backend to check that their "Use XSLT file" / "or .NET User Control" fields were all set correctly, and they all seem fine.

    From another thread I got the idea to check my xsltExtensions.config, and there are no extensions listed in there.

    I also redownloaded the live site and diff'd it with WinMerge against the (working) dev site, and couldn't see any changes that I thought could affect XSLT parsing - there's some media files they added, some differences in App_Data\TEMP\ClientDependency\ and App_Data\TEMP\ExamineIndexes\. The umbraco.config is different and the web.config has some differences, such as:

    • The umbracoDbDSN is different (as expected).
    • The SMTP server config is different (as expected).
    • There's a <defaultProxy> configured in the live sites <system.net>.

    None of these really stand out as something that would affect XSLT parsing to me.

  • George 28 posts 71 karma points
    Jul 04, 2011 @ 07:38
    George
    0

    My Umbraco version is umbraco v4.6.1 (Assembly version: 1.0.4029.25836).

  • George 28 posts 71 karma points
    Jul 04, 2011 @ 08:29
    George
    0

    I restarted my IIS App Pool and that fixed the problem - I'm assuming that this had something to do with clearing the cached XSLT files - I was looking at the GetXsltExtensions() method and it looked like it's mostly fiddling with cached XSLT macros.

    I'd still like to know (A) why this happened and (B) what I can do to stop it happening again. My client isn't going to be very happy if he has to restart his website every few days or have it all stop working. Does anyone have any ideas?

    Is dropping the cache period on all of my macros an option? http://4rapiddev.com/tips-and-tricks/caching-the-output-of-umbraco-macros/ What's a sensible value? 10 minutes?

  • George 28 posts 71 karma points
    Jul 08, 2011 @ 03:25
    George
    0

    Does anyone have any idea why this would have happened? It worries me that my site basically just stopped working and I have no idea why.

  • Heather Floyd 604 posts 1002 karma points MVP 5x c-trib
    Jul 15, 2011 @ 17:11
    Heather Floyd
    0

    George,

    We have noticed the same issue on a production website - totally random as far as we can tell.

    A site reset in IIS fixes the issue, as you have found.

    We are running umbraco v 4.0.2.1 (Assembly version: 1.0.3441.17657) on a load-balanced environment with 3 nodes.

    Did you experiement with turning off the macro caching? In general, turning off cachine doesn't sound ideal - unless it actually fixes the issue....

    Thanks!

  • Hans van den Berg 2 posts 22 karma points
    Jul 20, 2011 @ 10:04
    Hans van den Berg
    0

    We have the same problem on a site running in IIS 7.5 and Umbraco 4.7.0 with .NET 4. It happens about once every few days. Manually recycling the app pool fixes the problem, but we were so far unable to find the cause.

    From an analysis of the logs I get the impression the problem coincides with the moment of automatic app pool recycling, when IIS automatically recycles the app pool when the worker process has reached the preset app pool timeout. By default this is set to 1740 minutes, but the exact moment of the timeout and its cycle basically depends on when the site was started. In the Windows System log this moment appears as event id 5074 'A worker process with process id of '%1' serving application pool '%2' has requested a recycle because the worker process reached its allowed processing time limit'.  The Windows application log next mentions event 17137 'starting up database xxx', which is the database for the Umbraco site, in our case in SQL Server. Presumably recycling happens, as the database is started, but somehow things go wrong for Umbraco and we get this 'error parsing XSLT file'.

    Can it possibly be that automatic app pool recycling disturbs the Umbraco session and xslt-file caching under certain conditions, for instance when a site is busy?

    We have now changed recycling to only take place at night, but still have to find out if it really fixes the symptom.

  • Kle Miller 2 posts 22 karma points
    Jul 27, 2011 @ 06:23
    Kle Miller
    0

    Hi All,

    I can put my hand up for this one. We are running umbraco 4.6.1 .NET 4 in IIS6.

    - the problem ocurs about once a day or two.

    - We don't have to re-cycle the app pool or restart the website or IIS

    - We are running a dedicated VPS, not shared. Plenty of ram (6GB) and 4 Cores. 

    - generally the problem is fixed by the time i check the website after getting an email from the client about it. 

    - We have logging in the global ASAX for ApplicationStart, ApplicationEnd andApplicationError - and we get nothing from it to do with this error. 

    -Our App pool is only set to recycle if it hits some silly amount of memory (something like 3GB ) which it has never hit. 

    - We use an out-of-proc session state server. 

    I have noticed a log of 'Application Started ...' in the umbraco log table. 5 in the last 10 minutes. We are also using UmbracoLucene for our indexing search and i see a hell of a lot of indexing in the log table too. 

    I hope this sheds some light on the issue. It is causing our client grate concern and a fair amount of grief for myself. 

    cheers

    Kle

  • Oswald73 4 posts 21 karma points
    Sep 26, 2011 @ 12:06
    Oswald73
    0

    Any news on this subject?

    We have just had this issue for the first time in the lifetime of our homepage which has existed for more than half a year. A restart of the App-pool fixed the problem…

  • Ronald Mol 13 posts 32 karma points
    Oct 05, 2011 @ 13:38
    Ronald Mol
    0

    This morning experienced the problem after copying site to another server.
    Tried several  possible solutions from the forum like removing certain dll's, restart app pool, restart iis. No effect at all.

    Any other suggestions?

    Maybe the path ( for example \xslt\NameOfMyFile.xslt ) is wrong?
    Does Umbraco have /use a 'root setting' ?





     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Oct 16, 2011 @ 14:35
    Jan Skovgaard
    0

    Hi Midiman

    Have there been added som bin files to the bin folder, which is supposed to be used for XSLT extensions?

    If so are they registered properly in the umbracoSettings.config file? Or does the umbracoSettings.config file contain a reference to a .dll file in the bin folder, which no longer exists?

    /Jan

  • Ronald Mol 13 posts 32 karma points
    Oct 16, 2011 @ 15:12
    Ronald Mol
    0

    Hi Jan,

    Thnx for your reply.
    Haven't checked that out yet (why didnt I...?) but is a very good tip/hint.

    The umbraco site was moved to another (new) server/provider.
    All files in the site are copied as well as the database but maybe there some 'core' files (dll) are not in the GAC on the new server?
    If some xslt extentions need those dll's...that can explane the errors, am I right?

    I am going to check the xslt extensions first...

    Thnx!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Oct 16, 2011 @ 15:17
    Jan Skovgaard
    0

    Hi Midiman

    Sounds correct to me if I understand what you're saying correctly :)

    Looking forward to hear if this was the cause.

    /Jan

  • Ronald Mol 13 posts 32 karma points
    Oct 16, 2011 @ 15:21
    Ronald Mol
    0

    Hi,

    Havent got time enough to check it out today....but i'll let you know!


     


     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Oct 16, 2011 @ 18:45
    Jan Skovgaard
    0

    Ok, that's cool.

    I just got another idea...perhaps it's related to SQL CE dll's?

    See what Sergio writes in his last post here: http://our.umbraco.org/forum/developers/xslt/24446-geting-erro-when-creating-XSLT-node?p=0#comment92691

    That would also be worth checking.

    /Jan

  • Ronald Mol 13 posts 32 karma points
    Oct 16, 2011 @ 20:10
    Ronald Mol
    0

    Hi,

    I have read the thread (good rhyme :)) but do not understand exactly what SQL ce dll's are...
    Is SqlCE in the name of de dll or is it a kind of 'type' ? Dont know..



     

  • Ronald Mol 13 posts 32 karma points
    Oct 17, 2011 @ 09:24
    Ronald Mol
    0

    Hi,

    Searched the xslt files but to be honest I think I don't know what I am looking for.

    What I do is : search in top of xslt files which xmlns are used and see if there is a dll in the bin folder with same (almost same) name.

    I find very very much namespaces which are not in the bin folder.
    So....is this the right way and does that mean there is missing a lot or is this not the right way and perhaps you can give me a hint in right direction?

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Oct 17, 2011 @ 09:26
    Jan Skovgaard
    0

    Hi midiman

    You should check the xsltExtensions.config file in the config folder to see if there are some references to non-existing .dll files or if there are missing references to the ones that are being used.

    Eventually try and go to and view the site where you see the errors and add ?umbdebugshowtrace=1, which should give you a stack-trace where you may see an error description.

    Hope this helps.

    /Jan

  • Ronald Mol 13 posts 32 karma points
    Oct 17, 2011 @ 15:04
    Ronald Mol
    0

    Thnx, for help.

    But no solution yet.

    Checked the xsltExtensions.config in /config/

    This file contains far less nodes then there are dll in de then bin folder.

    Adding ?umbdebugshowtrace=1 does not show a stack trace at all.

    So.....guess I have to stop solving this problem.

    I was asked to fix the database connection of this site which has been done.

    After that the xslt error showed up. Because of my 'always at your service' attitude I hoped I could also fix this.

    But because I havent access to the original site and because I have not build this site my self it is to hard/unclear what is missing or what went wrong.

    But thnx for your help !

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Oct 17, 2011 @ 15:56
    Jan Skovgaard
    0

    Hi Midiman

    Ok, just to clarify - there should not neccesarily be a node in the xsltExtensions.config file for each dll found in the bin folder. It should of course only reference those dll's that actually holds xslt extensions.

    As a last shot on this try to change <add key="umbracoDebugMode" value="false" /> to true, and add ?umbdebugshowtrace=1 to your url once again...does this return anything?.

    /Jan

  • Anthony pj 40 posts 63 karma points
    Oct 17, 2011 @ 16:11
    Anthony pj
    0

    Randomly thought out the day when navigating to our.umbraco forum folder i have been receiving

    Forum

    Error parsing XSLT file: \xslt\forum-overview.xslt

     

    on reflesh page loads as expected.

  • Ronald Mol 13 posts 32 karma points
    Oct 17, 2011 @ 16:18
    Ronald Mol
    0

    Hi Jan,

    yes, now it shows some info.

    Gosh...need some coffee first...havent thought about that before.
    Message shows me that Razor and Mvc parts are missing.

    So I guess that Mvc is not installed on server and because there is no System.Web.Mvc dll in the bin folder either...this could cause the errors. (hope)

    Thnx so far... I am on my way fixing this problem :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Oct 17, 2011 @ 16:58
    Jan Skovgaard
    0

    Hi Midiman

    Happy I could help - ser frem til at høre hvordan det gik ;-) (I just saw you wrote some danish for me earlier on - sorry for that to other viewers of this thread.)

    /Jan

  • Ronald Mol 13 posts 32 karma points
    Oct 17, 2011 @ 17:00
    Ronald Mol
    0

    Nope. Bad luck...and again no succes.

    Razor dll was already there, mvc was missing but does not change anything about situation.

    Message : Master template is the same as the current template. It would course an endless loop!

    (by the way : should the word 'course' not be 'cause' ? Can I post that correction somewhere?)

    Have no access to backoffice of Umbraco yet and by checking the masterpages on the server with notepad everything seems to be correct.

    Pfffiew...what is best way to check this error?

     

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Oct 17, 2011 @ 17:02
    Jan Skovgaard
    0

    Could you post the message from the stacktrace perhaps?

    /Jan

  • Ronald Mol 13 posts 32 karma points
    Oct 17, 2011 @ 17:04
    Ronald Mol
    0
    umbracoPage Pagedata loaded for Home (ID: 1106) 1,36343912243681 0,000017
    umbracoPage Looking up skin information 1,3636132847469 0,000174
    template Master template is the same as the current template. It would course an endless loop! 1,36731352483873 0,003700
    default.aspx Culture changed to nl 1,3739730836512 0,006660
    aspx.page End PreInit 1,41927424300902 0,045301
    aspx.page Begin Init 1,41938623005709 0,000112
    item Start parsing 'pageName' 1,4328427984983 0,013457
    item Done parsing 'pageName' 1,43291442606024 0,000072
    item Start parsing 'metakeywords' 1,43294675876034 0,000032
    item Done parsing 'metakeywords' 1,43298354543951 0,000037
    item Start parsing 'metaDescription' 1,43300961069035 0,000026
    item Done parsing 'metaDescription' 1,43303901416993 0,000029
    renderMacro Rendering started (macro: [ Header] Advertisement, type: 1, cacheRate: 600) 1,45588668167032 0,022848
    umbracoMacro Before adding extensions 1,49515220618825 0,039266
    umbracoMacro InnerException

    Unable to load one or more of the types in assembly 'RazorEngine.Templates, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown:
    System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    Unable to load one or more of the types in assembly 'RazorEngine.Templates, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exceptions were thrown:
    System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    System.IO.FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
    at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute)
    at umbraco.macro.GetXsltExtensionsImpl()
    at umbraco.macro.<GetXsltExtensions>b__4()
    at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem)
    at umbraco.macro.GetXsltExtensions()
    at umbraco.macro.AddMacroXsltExtensions()
    at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters)
    at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)

     

    Bold = Red text

  • Hugh Hart 11 posts 31 karma points
    Nov 17, 2011 @ 16:47
    Hugh Hart
    0

    Same problem here. Just upgraded from Courier 2.1 to 2.5. Site has been working for a long time (almost a year) without problem. Now getting the same error message. I hope I can find a fix.

  • Hugh Hart 11 posts 31 karma points
    Nov 17, 2011 @ 17:40
    Hugh Hart
    0

    My problem resolved. I had installed Courier 2.5 without uninstalling 2.1. Steps to resolve, uninstalled both versions of Courier. Site then worked fine, without error. Then installed Courier 2.5, and site still worked fine. -- this occurred on both a Development site and its target companiaon TEST site in the same way for the cause of the error and its resolution.

  • Tim Officer 18 posts 39 karma points
    Nov 18, 2011 @ 05:02
    Tim Officer
    0

    Midiman, were you ever able to figure this out?? I have the exact same issue, I get that same message in my stack trace.

  • Obiwan 33 posts 67 karma points
    Dec 31, 2011 @ 17:30
    Obiwan
    0

    I have a related/similar bug, when using the same xslt macro (legacyXmlSchema = true) twice or more on the same page, but with different params. The last loaded macros params override other macros params when they are not defined/set in the usercontrol on the following requests. 

    How to re-produce the bug:

    Load two or more macros on the same page, adding some attributes to the macro in Umbraco. If the first macro does not use all the properties (default empty values) the second macro usage will cache and set the attributes on the following requests.

     

    This will cause rendering of invalid content....!!!

     

    In my case it was a menu macro with an attribute defining which node to use as start node for rendering, if not set the xslt macro would use the site's rootNode/defaultNode as the start node. But this bug caused the macro to load a wrong content tree as the menu :-(

     

    The fix is to change/update the UpdateMacroModel method code to the folowing, in the umbraco.presentation.macro.cs file:

    public void UpdateMacroModel(Hashtable attributes)
            {
                foreach (MacroPropertyModel mp in Model.Properties)
                {
        if (attributes.ContainsKey(mp.Key.ToLower()))
        {
         mp.Value = attributes[mp.Key.ToLower()].ToString();
        }
        else
        {
         mp.Value = string.Empty;
        }
                }
            }

    see more here:
    http://allan-laustsen.blogspot.com/2011/12/umbraco-4711-macro-parameter-bug.html 

    I have created a work item here: 
    http://umbraco.codeplex.com/workitem/30657  

  • Steve 1 post 21 karma points
    May 09, 2013 @ 00:14
    Steve
    0

    Was this fix implemented? I am having this problem now. the codeplex link is no longer valid.

    Thanks.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 09, 2013 @ 09:10
    Jan Skovgaard
    0

    Hi Steve and welcome to our :)

    This error can be caused by different things so it would be nice to know what version of Umbraco you're using and if you have been upgrading it. If you have been upgrading it, it's nice to know from what version to what version.

    It can also be caused by a missing reference to xslt extensions in the xsltExtensions.config file etc.

    Looking forward to hearing from you.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft