Browse Properties bug for Custom User Control Macros
I am using Umbraco 4.7.2, and are trying to create a Macro from a .Net User Control. This works fine, but as soon as I click on "Browse Properties" to extract the properties from the Macro, it fails with the following error:
Error reading usercontrols/ArticleList.ascx
The following list shows the Public Properties from the Control. By checking the Properties and click the "Save Properties" button at the bottom, umbraco will create the corresponding Macro Elements.
System.ArgumentException: The relative virtual path 'usercontrols/ArticleList.ascx' is not allowed here. at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) at System.Web.Hosting.HostingEnvironment.MapPath(VirtualPath virtualPath) at umbraco.IO.IOHelper.MapPath(String path, Boolean useHttpContext) at umbraco.IO.IOHelper.ValidateEditPath(String filePath, String validDir) at umbraco.developer.assemblyBrowser.Page_Load(Object sender, EventArgs e)
The codebehind for the control looks like the following:
I'm having the same issue. Please explain how this issue was resolved. The codeplex link you have above is bad and "Add Slash /" doesn't tell me much, if that is what resolved your issue.
EDIT:
Never mind. Adding a Slash "/" to the beginning of the path to the usercontrols does fix the issue.
Selecting the user controls from the drop down sets the path as: usercontrols/controlname.ascx
Had to be changed to: /usercontrols/controlname.ascx
I've never had to do that before. I have no idea why it would require it this time. I've got somewhere around 20 macros built with user controls this same way. This was the first that required adding the slash.
Browse Properties bug for Custom User Control Macros
I am using Umbraco 4.7.2, and are trying to create a Macro from a .Net User Control. This works fine, but as soon as I click on "Browse Properties" to extract the properties from the Macro, it fails with the following error:
Error reading usercontrols/ArticleList.ascx
The following list shows the Public Properties from the Control. By checking the Properties and click the "Save Properties" button at the bottom, umbraco will create the corresponding Macro Elements.
System.ArgumentException: The relative virtual path 'usercontrols/ArticleList.ascx' is not allowed here. at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) at System.Web.Hosting.HostingEnvironment.MapPath(VirtualPath virtualPath) at umbraco.IO.IOHelper.MapPath(String path, Boolean useHttpContext) at umbraco.IO.IOHelper.ValidateEditPath(String filePath, String validDir) at umbraco.developer.assemblyBrowser.Page_Load(Object sender, EventArgs e)
The codebehind for the control looks like the following:
Also experiencing the same problem.Known to be working with a nightly of 4.7.1.
Laux
This is the c#
https://gist.github.com/2964913
This issue has been resolved with http://umbraco.codeplex.com/workitem/30807
Add slash / ;)
I'm having the same issue. Please explain how this issue was resolved. The codeplex link you have above is bad and "Add Slash /" doesn't tell me much, if that is what resolved your issue.
EDIT:
Never mind. Adding a Slash "/" to the beginning of the path to the usercontrols does fix the issue.
Selecting the user controls from the drop down sets the path as: usercontrols/controlname.ascx
Had to be changed to: /usercontrols/controlname.ascx
I've never had to do that before. I have no idea why it would require it this time. I've got somewhere around 20 macros built with user controls this same way. This was the first that required adding the slash.
is working on a reply...