Dotnetnuke Actions button missing from site - dotnetnuke

I am using DNN 5.1 on a project and something's happened that I cannot quite figure out. The control button which controls the actions of any html module has gone missing. If I check the event viewer of DNN, this is what I get:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set
to an instance of an object. ---> System.NullReferenceException: Object reference not
set to an instance of an object. at otNetNuke.UI.Containers.ActionBase.get_ActionRoot()
at DotNetNuke.UI.WebControls.SolPartActions.BindMenu() at
DotNetNuke.UI.WebControls.SolPartActions.Page_PreRender(Object sender, EventArgs e) ---
End of inner exception stack trace
It seems to be a problem with the Skin file because if I switch to another skin ,the Actions button is back as normal. What I am not getting though is how this has changed since the last time I successfully used it.
If someone has some suggestions I would appreciate it.

I would suggest looking into your module container .ascx file and remove the references to solpart! and replace with a different provider. I find the standard ones are very slow. I will grab the code from one of my container .ascx files for you to examine - this uses another menu provider to handle the little admin menu's
<%# Control Language="vb" Codebehind="~/admin/Containers/container.vb" AutoEventWireup="false"
Explicit="True" Inherits="DotNetNuke.UI.Containers.Container" %>
<%# Register TagPrefix="ddr" TagName="ACTIONS" src="~/DesktopModules/DDRMenu/Actions.ascx" %>
<%# Register TagPrefix="dnn" TagName="TITLE" Src="~/Admin/Containers/Title.ascx" %>
<%Dim ModuleTitle As String = DotNetNuke.UI.Containers.Container.GetPortalModuleBase(dnnTITLE).ModuleConfiguration.ModuleTitle()%>
<dnn:title runat="server" id="dnnTitle" visible="false" />
<h3><%= ModuleTitle %></h3>
<div class="tab_edging" id="ContentPane" runat="server" style="border:1px solid white">
</div>
<div class="spacer">
<ddr:ACTIONS runat="server" />
</div>
we have installed an extra menu provider from http://www.dnngarden.com/Download.T87.aspx which i suggest you take a look at!

The problem is probably the container or some errant javascript. I would try switching to a different default container first. If that doesn't do it, look to see if there is any Javascript that is throwing errors (I generally do this in the Firefox Error console, but there are many ways).

Related

DNN custom skin gives jquery missing error

Whenever I try to make a custom skin object in Admin/Skins folder or Admin/Containers folder, I get the error
Uncaught ReferenceError: jQuery is not defined
I'm trying to add a bootstrap link skin object to be used in the template. DNN Newbie here!
<%# Control Language="C#" AutoEventWireup="false" Inherits="DotNetNuke.UI.Skins.Skin" Codebehind="Button.ascx.cs" %>
<%# Register TagPrefix="dnn" Namespace="DotNetNuke.UI.WebControls" Assembly="DotNetNuke.WebControls" %>
<asp:button id="btnButton" runat="server" cssclass="Normal" enableviewstate="False" MouseOverCssClass="LabelEditOverClass"
ToolBarId="titleToolbar" LabelEditCssClass="LabelEditTextClass" EditEnabled="True" EventName="none" LostFocusSave="false"></asp:button>
<DNN:DNNToolBar id="titleToolbar" runat="server" CssClass="eipbackimg containerTitle" ReuseToolbar="true"
DefaultButtonCssClass="eipbuttonbackimg" DefaultButtonHoverCssClass="eipborderhover">
<DNN:DNNToolBarButton ControlAction="edit" ID="tbEdit2" ToolTip="Edit" CssClass="eipbutton_edit" runat="server"/>
<DNN:DNNToolBarButton ControlAction="save" ID="tbSave2" ToolTip="Update" CssClass="eipbutton_save" runat="server"/>
<DNN:DNNToolBarButton ControlAction="cancel" ID="tbCancel2" ToolTip="Cancel" CssClass="eipbutton_cancel" runat="server"/>
</DNN:DNNToolBar>
Edit:
I'm trying to create various skin objects like button, title tags, body tags, which take in our CSS styling. So the Marketing department can just drop it to a location, edit the text/link of the button or edit the text in title, etc.
Looking a bit further, DNN does NOT load jquery automatically. You need to set up your custom skin to load it.
See: https://www.dnnsoftware.com/wiki/client-resource-management-api
The short answer to your question is that you can do all of this using the user control DnnJsInclude. Note that there is also a DnnCssInclude control.
As I understand things (from the referenced item), these load the js and CSS files only if they have not yet been loaded.
If you are looking for a model for a DNN Theme, have a look at nvQuickTheme on GitHub.
Thanks to Will Strohl for pointing me in the right direction ...

JSTL on AppEngine - tags not working

I want to use JSTL in my AppEngine JSP to render data. I have completed the Guestbook demo, which works fine for me, including the JSTL calls like this one (from the linked example):
<blockquote>${fn:escapeXml(greeting_content)}</blockquote>
However, I then tried to use JSTL through tags, e.g. this:
<fn:out value="greeting_content" />
or just
<fn:out value="" />
I get a 500 error and an exception stack trace saying:
org.apache.jasper.JasperException: /guestbook.jsp(80,4) No tag "out" defined in tag library imported with prefix "fn"
The JSTL library is imported at the top of the file as in the example, i.e.
<%# taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
And as expected, if I remove that line the ${fn:something} calls stop working.
Does anyone have an idea why that is? JSTL is supposed to work that way, isn't it? I feel like I'm missing something fundamental here, but I just can't find what it is.
You should use <c:out value=""/> for output.

Add HTMLelement to RootPanel in GWT

I have a <div> in my HTML page. What I need to do is, add <ul> element inside it from my Entry point class. I have tried from onModuleLoad function using below code,
UListElement ul=Document.get().createULElement();
ImageElement img=Document.get().createImageElement();
img.setSrc("\\images\\personas");
LIElement li=Document.get().createLIElement();
li.appendChild(img);
ul.appendChild(li);
Document.get().getElementById("divPhotos").appendChild(ul);
but my <div> is empty/has no childs when i run it. what am I missing here?
Your code is okay assuming you have correctly assigned the "divPhotos" id to a div in your HTML DOM. I suspect that you are viewing the page source and expecting to see the newly appended DOM elements. What you want to view is the pages live DOM. How you inspect the DOM in depends on the web browser you are using. if your using Google Chrome, press F12 to access the debugging tools which will allow you to transverse the live DOM. For Firefox, you need to install Firebug. Other browsers provide their own debugging mechanisms.
I have forgot to add nocache.js in html page.
<script type="text/javascript" language="javascript" src="test/test.nocache.js"></script>
Its working now...

Liferay: Showing Related Assets for Calendar Event in the list page

I'm working to customize liferay's Calendar portlet and have created a hook for this.
I want to show all the "Related Assets" associated with a Calendar Event directly in the list page itself where all the Events are displayed instead of the Event's detail view page.
Currently liferay shows the "Related Assets" only when we click on the Event to view the details of that Event.
Can anyone help me?
Environment: Liferay 6.1
Thanks a lot
Sabrina
I assume you already have liferay's source code and you know how to create a hook.
The JSPs you would be modifying would be in this path:
portal-web/docroot/html/portlet/calendar
So here are some steps to help you solve your query:
You need to modify the event_iterator.jspf: row.addText(event.getTitle(), rowURL);
You have to adjust the following code taken from view_event.jsp in event_iterator.jspf.
<%
AssetEntry layoutAssetEntry = AssetEntryLocalServiceUtil.getEntry(CalEvent.class.getName(), event.getEventId());
%>
<%-- <liferay-util:buffer> is a tag which stores all that is written inside
its body in a single variable string, in this case "relatedAssetsLinksBuffer"
--%>
<liferay-util:buffer var="relatedAssetsLinksBuffer">
<c:if test="<%= enableRelatedAssets %>">
<%=event.getTitle() %>
<div class="entry-links">
<liferay-ui:asset-links
assetEntryId="<%= layoutAssetEntry.getEntryId() %>"
/>
</div>
</c:if>
</liferay-util:buffer>
Now the line in step-1 becomes: row.addText(relatedAssetsLinksBuffer, rowURL);
I have not tried this but I think it would work or will atleast give you some help in solving your query.
Tip for Hooks (might be useful in future):
Liferay follows a convention in storing its JSPs, so for custom-jsps Hook (i.e. a hook created for modifying liferay's JSP) you just need to search for that particular JSP & modify it.
For Eg: You wanted to modify the first page of calendar portlet. So liferay portlet's first page is always view.jsp located in the folder with the same name as the portlet-name in this case "Calendar" and view.jsp will contain some tags like <%# include /> or <liferay-util:include /> which would include other files to show the content. So you can always start with a view.jsp and navigate ahead. By the way the names of the JSPs are also most of the time self-explanatory.
Hope this helps.

Facebook Open Stream Api in Silverlight

I want to prompt the user to use the Open Stream api. When I call showPermissionDialog, the code executes fine, but nothing pops up. I know you can't put HTML in a Silverlight app, but the popup should show up on top of the Silverlight app. Is this possible? If so, how?
Here's my code:
In MainPage.xaml.cs:
((HtmlPage.Window.GetProperty("FB") as ScriptObject)
.GetProperty("Connect") as ScriptObject)
.Invoke("showPermissionDialog", "publish_stream");
I also tried
HtmlPage.Window.Invoke("ShowFBPermissionsDialog"); (in MainPage.xaml.cs)
with
<script type="text/javascript">
function ShowFBPermissionsDialog() {
FB.Connect.showPermissionDialog("publish_stream");
}
</script>
in Site.master.
I don't know how to set a Z-index on the permissions dialog since that is generated by Facebook.
There are no error messages.
Put
<param name="windowless" value="true"/>
into your Silverlight object tag and then use CSS Z order to position.
You can use a negative z order for the Silverlight object and the div it's in.
Michael

Resources