I have came across a strange issue regarding a logoff a user from site with my specific theme.
When I press the logoff link, then page is refreshed, but user is still logged in. When I changed the site skin to the default provided by the DNN, then there is no problem.
In completly diffrent site that I created with my custom theme, this links works also. I have disabled the javascript thinking that, maybe some js script mess something but result is the same.
I don't know where to start looking for this issue. Any suggestions?
Disabling javascript is a problem. The "logoff" link uses javascript.
GO back to your custom skin with javascript enabled, and use the developer tools to open the Console window. You should see information there that will help identify the problem.
Try messing with the order and priority of the javascript files in the .ASCX skin control. For example, if you have:
<dnn:DnnJsInclude runat="server" FilePath="jquery.one.js" PathNameAlias="SkinPath" />
<dnn:DnnJsInclude runat="server" FilePath="jquery.two.js" PathNameAlias="SkinPath" />
Try switching them around, or alternatively try changing their priorities, like so:
<dnn:DnnJsInclude runat="server" FilePath="jquery.two.js" PathNameAlias="SkinPath" Priority="100" />
<dnn:DnnJsInclude runat="server" FilePath="jquery.one.js" PathNameAlias="SkinPath" Priority="150" />
Sometimes there is a conflict in the order in which the libraries are loaded, even if it doesn't show up in the console.
You can read more about this in the Client Resource Management API
Finally, try comparing the several skins .ASCX files to each other, to see if something is missing in this particular one.
Related
For our website we want to use a megamenu that is created with razor.
In the Gravity skin folder of DNN, we have created a folder called MegaMenuNav and we have added our MegaMenu.cshtml and menudef.xml into it.
We have downloaded the ddrmenu example and used it like this:
<dnn:MENU ID="MENU" MenuStyle="MegaMenuNav" runat="server" NodeSelector="*"></dnn:MENU>
we get no error, but nothing is shown as well.
All of the example menus that use token or xslt, such as Dropdown and Mega2DNN are shown, but when we use Razor menus, nothing is shown.
For testing, we added a simple text inside our MegaMenu.cshtml, but again we got no result
Is there anything to do with dotnetnuke?
BTW, we are using .Net 4.5 and Dnn 8.0.2
Thanks in advance
Having clients over the globe, we encountered some serious loading delays for initially retrieving the XAP from various locations. The hope was that we could host the compiled XAP in the cloud, offering a closer download depending on the end-user's location.
We are using RIA services, but the service endpoints need to remain on our local server, because of data connections, connections to internal services, etc.
How do we distribute the XAP using cloud-based services, while having it continue to function the same as it does currently?
EDIT: Since I worked through this and found the answer myself, I've moved the steps that I had accomplished before out of my question and into the answer to better facilitate a good Q&A format and for anyone else approaching the problem from step zero.
After hammering away at this, I found the solution to get it almost completely working.
Update RIA service endpoints with absolute URIs to refer back to the hosting page rather than relative to the XAP location itself.
Ensure all image (etc.) content is loaded from either resources in the XAP or else ensure they are uploaded as well to the Azure Storage Blob. Any relative paths will try to resolve to the XAP location.
Generate the XAP file and upload to the Azure Storage Blob. You will need to ensure that the XAP has Content-Type of application/x-silverlight-app. I accomplished this using Azure Storage Explorer. You can set Content-Type by opening the properties of the item via double-click, but, and even better, you can click the Settings gear to 'Edit Content Types' and add a rule that .xap is application/x-silverlight-app so that it will be automatically set any time you upload.
Ensure you have a proper cross domain policy in place.
Update your hosting page to supply the new source. Additionally, you will need to add the enablehtmlaccess param if not already set, since this value is false by default for cross domain.
For item #1, I accomplished using code such as the following:
var u = HtmlPage.Document.DocumentUri;
Site = u.AbsoluteUri.Substring(0, u.AbsoluteUri.LastIndexOf('/'));
MyServiceUri = new Uri(Site + "/ClientBin/My-Namespace-MyService.svc", UriKind.Absolute);
For item #4, my code looked like:
<param name="source" value="<%= Request.Url.Scheme %>://mytest.blob.core.windows.net/my-container/MySilverlightApp.xap"/>
<param name="enablehtmlaccess" value="true" />
One last thing to note: If using a custom splash screen, then figure out how to get this to work. I don't know how. What I have found out is that if you set splashscreensource as the location of a .xaml file, then it simply does not load. It will just show the basic silverlight load percent screen, which does at least seem to report load % correctly. In order to get the custom splash screen to load, it seems to only work when included inline. You can do this via:
<script id="xamlSplash" type="text/xaml">
<%= System.IO.File.ReadAllText(Context.Server.MapPath("~/Loading.xaml")) %>
</script>
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="splashscreensource" value="#xamlSplash" />
However, while this will show the custom splash screen, it will not work if you have any progress report on the splash screen. The javascript function referenced by onsourcedownloadprogresschanged will never fire. I could not find why this was the case, nor a way around it. You'll just have to have a spinning animation or the like in place of an actual % progress indicator.
We have an asp:Silverlight tag on one of our aspx pages and has been working happily for years:
<asp:Silverlight ID="Xaml1" runat="server" MinimumVersion="2.0" Source="~/ClientBin/FHH.UploadManager.xap" Width="97%" Height="320" />
The user selects multiple files, which are listed in the Silverlight API, then the user left-clicks on a file and selects what type of file it is, then the files are uploaded and end up in different folders depending on the type.
As an enhancement it is required that we have another type and we amended the Silverlight project to include this extra type, creating a new xap file. This worked fine in test but when it was built for the live environment the Silverlight tag disappears from the screen.
I have browsed through various forums, including Stackoverflow and found the suggestion that we should use <object>, but when I tried that it gave an error message: ‘Could not download the Silverlight application’.
Any help will be appreciated.
We have resolved this problem, we were trying to point to a web service with the wrong URL, 2 URLs could be used and we were using the wrong one.
I have a DNN module that I wrote that includes the css/js for the jquery fancybox plugin like so:
<%# Control Language="C#" AutoEventWireup="true" CodeBehind="View.ascx.cs" Inherits="DotNetNuke.Modules.WebPortfolio.View" %>
<%# Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
<dnn:DnnCssInclude runat="server" priority="10" FilePath="DesktopModules/WebPortfolio/Scripts/Fancybox/jquery.fancybox.css" />
<dnn:DnnJsInclude runat="server" priority="10" FilePath="DesktopModules/WebPortfolio/Scripts/Fancybox/jquery.fancybox.pack.js" />
When I'm in Edit mode, everything is fine and dandy, but when I switch to View mode, the css and js are not included. This seems fairly simple, so I guess I'm missing something, but what? Why aren't the scripts loading in View mode?
DNN version is 6.2.4
Edit: I've been fighting with this all last night and this morning. The script loads every time in Edit mode, but when in View mode or logged out, it loads maybe once or twice, then fails to load. Interestingly, I added a server side timestamp to the module's view control and disabled all caching (browser, DNN host settings) and the file is still being cached. This occurs on both my local machine (IIS Express) and our staging server (IIS 7.5).
If I bounce the web server and clear the Portals/0/Cache directory, the script occasionally loads the first time, but fails after that. I've finally resorted to a client side check which loads the script dynamically if necessary, but that circumvents the goodness of the client resource management API, so I'd really like to figure out a proper solution.
This sounds like an issue that I just logged (DNN-20363), where resources registered with the Client Resource Management Framework aren't included when the module is cached. I was running into this when the module had module caching on. Does your module have a default cache time set in its module definition? You might try turning that off and then adding a new instance (to make sure that the caching setting itself isn't getting cached).
I'm trying to add a Google +1 button to my website.
I have followed the instructions here:
http://www.google.com/intl/en/webmasters/+1/button/index.html
This the code for my webpage:
<html>
<head>
<title>
Why won't it appear?
</title>
<!-- Place this tag in your head or just before your close body tag -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
</head>
<body>
<h1>
Example title
</h1>
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="tall" href="http://www.example.com/"></g:plusone>
</body>
</html>
As you can see, I've followed their instructions exactly, and yet it does not appear. I've tried it on Chrome, Firefox and IE8 (all on Windows XP). I'm just opening the webpage from my local system.
Interestingly I can see it working here http://www.satinbow.co.uk/xxtest.html
Can anyone solve the mystery?
Update / clues
When the page is stored on my system locally, it doesn't work (hard refreshing didn't fix it either.)
But I've put the page here: dl.dropbox.com/u/6920023/test2.html and it seems to work there.
It would be really cool know what's going on :)
I think it's because when it's local (not webserver) browser block the JS script (that's hosted externally) to prevent security breach. That's why it doesn't work
Link: http://ejohn.org/blog/tightened-local-file-security/
Another thing to check for is whether you have any ad blockers active. These can disable the +1 button and move the iframe containing the button out of the screen.
Working on my open source project, http://code.google.com/p/gwt-socialmedia,
i have discovered another reason that can cause the +1 button not to render: You forgot to define the "URL to +1": It must be a valid URL to an accessible website (so http://localhost won't work for i.e.).
Indeed, the PlusOne API seems to connect to the site URL, in order to get some metadata about it (like the description, title, etc)
If you don't define the URL, Google will send you an error HTTP 400 (Bad Request), with the internal message : "The requested URL was not found on this server. "
and the button will not appear...
Hope it helps!
Due to browser security(as mentioned in one of the answer) it would not display the button. Still to display google plus buttons when your file is local use local web server(WAMP/XAMPP) or you may use PHP local server https://www.sitepoint.com/taking-advantage-of-phps-built-in-server/ to host your file on your computer and you will see the button displayed in your file.