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.
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.
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.
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.
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 ;-)
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.
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
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.
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?
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.
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
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.
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.
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
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.
Hi,
do you have a umbracoRedirect on your top-most node perhaphs? If so, this causes the behaviour your experiencing.
HTH,
PeterD
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?
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
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.
okay, it isn't the hardening list as they are all set the same on dev and prod.
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
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.
Excellent - The Network Service permission thing solved it for me, too.
I have this problem too. Wasn't this fixed in 4.5(.1)?
This was never a bug.. So no, not fixed! ;-)
Check the permissions on your XSLT folder (as explained in the previous posts)
already did that. Creating new file and edit-save it also gives the same problem.
What's the error? What does umbracoLog / windows event log say? How about if you run VS in debug mode, any exceptions?
Windows event log stays quiet. Umbraco log table doesn't show entry and VS studio doesn't break when attached to w3wp.exe
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?
Why would that help if unchecking "Skip testing (ignore errors)" works?
if it's a permission problem that should fail too.
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.
the xslt is perfectly fine. didn't change anything. Just from a running site which renders everything correctly.
Also, I have umbracoredirect on the top node of all of my sites, never get this error. 4.0.2,3 and 4
Is it something I helped with or a new site?
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?
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?
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:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Any ideas ?
Sergio Nunes
I got it!
Paul Sterling gave a clue. I just delete those assemblies files (SqlCE) and everything runs smoothly now.
Sergio Nunes
is working on a reply...