London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
I have solved it but I'm not certain if it is meant to be solved like this
To say before I start: The "SecureUI" folder I write about is the EPiServer UI folder, I named it "SecureUI" at installation.
I had help from the following:
http://labs.episerver.com/en/Blogs/Mari-Jorgensen/Dates/111987/112010/Lessons-learned-Module-Conversion/
where I found that I have to register the following:
<script type="text/javascript" src="<%= EPiServer.UriSupport.ResolveUrlFromUtilBySettings("javascript/episerverscriptmanager.js") %>"></script>
<script type="text/javascript" src="<%= EPiServer.UriSupport.ResolveUrlFromUIBySettings("javascript/system.js") %>"></script>
<script type="text/javascript" src="<%= EPiServer.UriSupport.ResolveUrlFromUIBySettings("javascript/system.aspx") %>"></script>
I do this in my masterpage.
But if I'm not logged in as admin or editor I get an javascript exception because I dont have access to "SecureUI/javascript/system.aspx".
I have read this before, about Virtual Path Providers and UrlMappings
http://epicms.blogspot.com/2007/03/no-alternate-files-and-it-really-makes.html
So I added the following urlmappings in web.config:
<virtualPathMappings>
<add url="~/Util/javascript/system.js" mappedUrl="~/SecureUI/javascript/system.js" />
<add url="~/Util/javascript/system.aspx" mappedUrl="~/SecureUI/javascript/system.aspx" />
</virtualPathMappings>
And I also changed the following lines in my masterpage, ResolveUrlFromUtilBySettings instead of ResolveUrlFromUIBySettings:
<script type="text/javascript" src="<%= EPiServer.UriSupport.ResolveUrlFromUtilBySettings("javascript/system.js") %>"></script>
<script type="text/javascript" src="<%= EPiServer.UriSupport.ResolveUrlFromUtilBySettings("javascript/system.aspx") %>"></script>
Now it works! But is it meant to be done like this?
Regards Hans
I have tried to put an InputDate webcontrol on a page. But I got a javascript error. The onclick event on the InputDate is "EPi.CreateDateBrowserDialog". This javascript method is in "UI/javascript/system.js". But in web config the UI folder only allow roles WebAdmins and WebEditors.
Am I missing something? My idea is that I should be able to use this webcontrol even for anonymous users.
Regards Hans