Copied to clipboard

Flag this post as spam?

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


  • Timsn 121 posts 231 karma points
    Feb 06, 2009 @ 17:44
    Timsn
    0

    Problems with saving a xslt file

    Everytime I want to save a xslt file the error message "could not save xslt file" appears.
    I believe it has nothing to do with synatx errors or something inside the xslt, because I can't even save a empty xlst file. #-o
    I can check the "Skip testing (ignore errors)" field and saving works perfectly. But of course with no error handling. So file permissions are working too.

    Hope someone can help here :)
    Thank you.

  • Timsn 121 posts 231 karma points
    Feb 07, 2009 @ 14:23
    Timsn
    0

    Is there a way to edit (and debug) xslt files outside from umbraco?
    I've found the Umbraco Xslt Editor but it doesn't seem to work with umbraco 4 because the FileService.asmx is missing.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Feb 07, 2009 @ 14:30
    Dirk De Grave
    0

    Hi,

    Xslt's can be edited/debugged from xslt. Editing is not an issue of course, for debugging, there's some config required (Need to set up vs.net, copy all relevant files...).

    Due to my lack of writing things done during level 2 training in cph, I've forgotten how to debug those... (:

    But, it has been promised once that the core team will screencast about how to debug xslt from within vs.net. Hoping to see that screencast soon.

    Meanwhile.... can't help.

    Regards,
    /Dirk

  • Timsn 121 posts 231 karma points
    Feb 07, 2009 @ 14:48
    Timsn
    0

    Hi Dirk, I'll try it in vs.net.
    Do you have any idea why I can't save my xslt files within umbraco without setting the "Skip testing" checkbox?
    This testing would maybe be enough for me to debug my xslt.

    Thanks.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Feb 07, 2009 @ 14:51
    Peter Dijksterhuis
    0

    Hi,

    do you have a umbracoRedirect on your top-most node perhaphs? If so, this causes the behaviour your experiencing.

    HTH,
    PeterD

  • Timsn 121 posts 231 karma points
    Feb 07, 2009 @ 14:58
    Timsn
    0

    Uhm, yes I have :)

    I think that solved my problem, but why?
    What does this have to do with my xslt's ?
    And how can I work around this problem?

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Feb 07, 2009 @ 15:49
    Peter Dijksterhuis
    100

    Its a bug in Umbraco (allready listed at codeplex)
    There's no real solution yet. Either find a way to get rid of the redirect, or check the box 'skip testing'. At least, that's how I deal with it ;-)

    HTH,
    PeterD

  • Brett Sargeant 7 posts 21 karma points
    Aug 04, 2009 @ 12:18
    Brett Sargeant
    0

    I have a similar problem. In our dev environment I can edit and save an XSLT through the GUI. In the production environment I repeatedly get "XSLT file can not be saved". "skip testing" makes no difference, it still refuses to save.

    I suspect it is a permission issue. I used Paul Sterling's hardening list http://www.motusconnect.com/blog/2009/3/6/umbraco-security-best-practices ; when we went live. I tried resetting the permissions on the XSLT directory for network service back to full control but it hasn't made a difference.

    As far as I can tell there is no umbracoredirect on the root node.

    Any ideas on what settings I might need to change to make it work ?

    I'm going to apply the hardening rules to the dev environment one at a time to see if it is one of them, but in case I am wrong about it being a permissions issue I wanted to post here as well.

  • Brett Sargeant 7 posts 21 karma points
    Aug 04, 2009 @ 12:39
    Brett Sargeant
    0

    okay, it isn't the hardening list as they are all set the same on dev and prod.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Aug 04, 2009 @ 12:47
    Peter Dijksterhuis
    0

    Are you able to create a new xslt and save that a couple of times?

    If you can do that, but not save an existing one, it is probably due to ownership. Quickest wy to solve this is to delete and recreate the xslt I think

  • Brett Sargeant 7 posts 21 karma points
    Aug 06, 2009 @ 04:20
    Brett Sargeant
    0

    Thanks :)

    ownership was the problem, for some reason the Network service wasn't listed in the permissions for the XSLT files themselves but was on the directory.

    I created a new XSLT and compared the permissions between them and it was the only one different.

  • overflew 87 posts 110 karma points
    Jun 23, 2010 @ 01:42
    overflew
    0

    Excellent - The Network Service permission thing solved it for me, too.

  • Yannick Smits 321 posts 718 karma points
    Aug 03, 2010 @ 17:06
    Yannick Smits
    0

    I have this problem too. Wasn't this fixed in 4.5(.1)?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 03, 2010 @ 17:30
    Sebastiaan Janssen
    0

    This was never a bug.. So no, not fixed! ;-)

    Check the permissions on your XSLT folder (as explained in the previous posts)

  • Yannick Smits 321 posts 718 karma points
    Aug 03, 2010 @ 17:34
    Yannick Smits
    0

    already did that. Creating new file and edit-save it also gives the same problem.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 03, 2010 @ 17:36
    Sebastiaan Janssen
    0

    What's the error? What does umbracoLog / windows event log say? How about if you run VS in debug mode, any exceptions?

  • Yannick Smits 321 posts 718 karma points
    Aug 03, 2010 @ 17:45
    Yannick Smits
    0

    Windows event log stays quiet. Umbraco log table doesn't show entry and VS studio doesn't break when attached to w3wp.exe

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 03, 2010 @ 17:47
    Sebastiaan Janssen
    0

    Try giving network service write access to the whole folder including subfolders in which the site resides. Make sure your app pool is actually using network service as a user. Does saving of templates work?

  • Yannick Smits 321 posts 718 karma points
    Aug 03, 2010 @ 17:49
    Yannick Smits
    0

    Why would that help if unchecking "Skip testing (ignore errors)" works?

    if it's a permission problem that should fail too.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 03, 2010 @ 17:58
    Sebastiaan Janssen
    0

    Oh right, I missed that part, didn't read the whole post ;) So.. your xslt seems to be wrong, what is the exact error that umbraco gives you?

    I usually, when all else fails, strip everything out of the xslt and start adding things until it breaks again.

  • Yannick Smits 321 posts 718 karma points
    Aug 03, 2010 @ 18:00
    Yannick Smits
    0

    the xslt is perfectly fine. didn't change anything. Just from a running site which renders everything correctly.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 03, 2010 @ 18:01
    Sebastiaan Janssen
    0

    Also, I have umbracoredirect on the top node of all of my sites, never get this error. 4.0.2,3 and 4

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 03, 2010 @ 18:02
    Sebastiaan Janssen
    0

    Is it something I helped with or a new site?

  • Yannick Smits 321 posts 718 karma points
    Aug 03, 2010 @ 18:03
    Yannick Smits
    0

    new site.

    When I disable the redirect on the top node it's fixed. But what if I want to have a redirect on the top-node?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 04, 2010 @ 10:23
    Sebastiaan Janssen
    0

    That's annoying! Weird that I've never encountered this problem. Maybe it's something in the XSLT that gets triggered due to you trying to go to the root level of the site (instead of the top node, so "Content")? Something like $currentPage/ancestor-or-self::root ..?

    You could always do a redirect by using urlRewrite or by creating a httpHandler that will take some property (redirectId instead of umbracoRedirect) and redirect to the correct URL. At least you can then also use a proper 301 redirect instead of a 302.

    Maybe you could "abuse" the 301 URL Tracker?

  • Sergio Nunes 15 posts 36 karma points
    Sep 29, 2011 @ 15:33
    Sergio Nunes
    0

    Hi guys,

    I have some trouble to save my xslt files at a prod server (which is hosting at godaddy.com), I've done a permission check through "/install/?installStep=filepermissions", and it says “Your permission settings are perfect, you are ready to run umbraco and install packages”. I've set permission to read/write in all folders. 

    every time I try to create or save a xslt file I get the error below:

    Server Error in '/' Application.


    Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown:
    System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.Exception: Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown:
    System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace: 

    [Exception: Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown:
    System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
       umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) +390
       umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) +124
       umbraco.macro.GetXsltExtensionsImpl() +885
       umbraco.macro.<GetXsltExtensions>b__4() +5
       umbraco.cms.businesslogic.cache.Cache.GetCacheItem(String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) +132
       umbraco.macro.GetXsltExtensions() +214
       umbraco.macro.AddXsltExtensionsToHeader(String xslt) +130
       umbraco.XsltTasks.Save() +410
       umbraco.presentation.create.dialogHandler_temp.Create(String NodeType, Int32 TypeId, Int32 NodeId, String Text) +384
       umbraco.presentation.create.xslt.sbmt_Click(Object sender, EventArgs e) +173
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

     

    Any ideas ?

     

    Sergio Nunes

  • Sergio Nunes 15 posts 36 karma points
    Sep 30, 2011 @ 03:43
    Sergio Nunes
    0

    I got it!

    Paul Sterling gave a clue. I just delete those assemblies files (SqlCE) and everything runs smoothly now.

     Sergio Nunes

Please Sign in or register to post replies

Write your reply to:

Draft