DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

ModuleAction on custom modules

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





Growing Member





    Hello,
    I'm adapting some modules from 7.4 to 9.11.2 and I'm facing with ModuleActions.
    In simple terms, icons are not rendered while editing pages (the top right icons does not appear):


            public ModuleActionCollection ModuleActions
            {
                get
                {
                    ModuleActionCollection Actions = new ModuleActionCollection();
                    .............
                        Actions.Add(
                            GetNextActionID(),
                            "Provider Settings",
                            ModuleActionType.ContentOptions,
                            "Settings",
                            "",
                            EditUrl("Settings"),
                            false,
                            SecurityAccessLevel.Edit,
                            true,
                            false);
                    }
                   ................
                   return Actions;
              }

    Any idea?
    Thanks
    S.






    Veteran Member





      Hello!  It looks like you're using a reserved word in your Action.  You shouldn't use Settings for any of your actions.  This is reserved for the built-in ModuleSettings view.  You can use pretty much anything else, but be careful when using Edit, depending on what you're doing overall.  






      Growing Member





        Thanks Will, settings it's not the original string.
        Replacing with "ABC" give the same result.:-/

        S.





        Veteran Member





          Well, if all you did was change the value and then rebuild, it won't have any impact.  You'll also either need to manually edit the value in the Module Controls view in the Extensions editor (persona bar), or you edit it in the DNN manifest and then "reinstall" the module to force the update that way.  Regardless, it will end up needing to be done both in the code and in the DNN manifest.  






          Growing Member





            What I meant, was that I changed the string before posting the code, in order to hide some product information.
            S.






            Veteran Member





              Oh, then if it wasn't Settings before, it should have worked (assuming everything was wired up).  

              At this point, you'll want to make sure there aren't any typos.  Whatever it is in your code needs to be the same in the database where the module controls are defined, and also in the DNN manifest file.  I'd recommend copying and pasting whatever is already in the database, should it still exist.  Otherwise, copy and paste from your DNN manifest.  

              To find out what DNN is expecting: 

              1. Log in as a superuser. 
              2. In the persona bar, find the Settings section (gear icon) and choose Extensions.  
              3. Find the extension you're working on and click the pencil icon next to it.  
              4. Choose the Extension Settings tab.  
              5. Scroll down to Module Definitions, and click the pencil icon next to it.  
              6. You'll see a list of one or more controls.  Click the pencil icon next to the one you're working on in this post.  The resulting view will look something like the example below.  

              As you can see, this is using the Blog Module as the example below.  So please try to match things up to your environment. 

              What you're looking at below is the view where the module control can be edited, including the value you're having a potential issue with right now.  The Key is what should match the value we previously were discussing to be Settings.  The Type can be something that could get in the way too.  Just be sure that if it's an editing view, you specify Edit for the value.  This will match the permissions you apply in the module and page in the Edit column.  View should be used for module controls that you wish to respect the View permissions column on the page and module.  






              Growing Member





                Thanks Will!
                Maybe the problem is in the skin.
                What is the HTML fragment that renders these controls?





                New Around Here





                  Hi,

                  Maybe you can check if the container uses some obsolete DNN controls like SolPartActions. ActionButtons can also be removed.

                  If yes, I suggest you to simply remove them because the recents DNN versions doesn't use the SolPartActions anymore to display the module menus and ActionButton will disable the menu display.
                  Don't forget to remove the controls registration and the corresponding tags.






                  Veteran Member





                    There shouldn't be any HTML to review and troubleshoot, as long as everything is wired up AND there's nothing in the theme that is breaking the feature. 

                    Do you see the actions menu in other modules?  Do those menu items appear to be working correctly?  If the answer to those questions is "yes," then the issue is with the code and the values that are registered in DNN as earlier suggested.  

                    Do you see any other symptoms that may be contributing to the issue?  Have you checked the two event logs to see if there might be any related errors?  






                    Growing Member





                      Thanks all guys!
                      @Will: the event logs was the first thing I've checked before posting.
                      @Stephane: maybe you got the point!
                      This is my container, with Solpart elements commented out...but I think something is missing..
                       


                      <%@ Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Containers.Container" %>
                      <%-- <%@ Register TagPrefix=&quot;dnn&quot; TagName=&quot;ACTIONS&quot; Src=&quot;~/Admin/Containers/SolPartActions.ascx&quot; %> --%>
                      <%@ Register TagPrefix="dnn" TagName="ICON" Src="~/Admin/Containers/Icon.ascx" %>
                      <%@ Register TagPrefix="dnn" TagName="TITLE" Src="~/Admin/Containers/Title.ascx" %>
                      <%@ Register TagPrefix="dnn" TagName="VISIBILITY" Src="~/Admin/Containers/Visibility.ascx" %>
                      <%@ Register TagPrefix="dnn" TagName="ACTIONBUTTON" Src="~/Admin/Containers/ActionButton.ascx" %>

                      div class="DeepSkyBlue01_style">
                        div class="DeepSkyBlue01_top_bg">
                          div class="c_icon">
                            dnn:ICON runat="server" id="dnnICON" />
                          /div>
                          div class="c_title">
                            h2 class="c_titles"> dnn:TITLE runat="server" id="dnnTITLE"  CssClass="c_title_DeepSkyBlue" /> /h2>
                          /div>
                          div class="DeepSkyBlue01_c_menu">
                            <%-- <dnn:ACTIONS runat=&quot;server&quot; id=&quot;dnnACTIONS&quot; &nbsp;ProviderName=&quot;DNNMenuNavigationProvider&quot; ExpandDepth=&quot;1&quot; PopulateNodesFromClient=&quot;True&quot; /> --%>
                          /div>
                          div class="DeepSkyBlue01_c_help">
                            dnn:ACTIONBUTTON runat="server" id="dnnACTIONBUTTON5" CommandName="ModuleHelp.Action" DisplayIcon="True" DisplayLink="False" />
                          /div>
                          div class="clear_float"> /div>
                        /div>
                        div class="c_content_style">
                          div id="ContentPane" runat="server" class="DeepSkyBlue01_content"> /div>
                        /div>
                        div class="c_footer">
                          div class="c_footer_l">
                            dnn:ACTIONBUTTON runat="server" ID="dnnACTIONBUTTON1" CommandName="AddContent.Action" DisplayIcon="True" DisplayLink="True" />
                          /div>
                          div class="c_footer_r">
                            dnn:ACTIONBUTTON runat="server" ID="dnnACTIONBUTTON2" CommandName="SyndicateModule.Action" DisplayIcon="True" DisplayLink="false" />
                            dnn:ACTIONBUTTON runat="server" id="dnnACTIONBUTTON3" CommandName="PrintModule.Action" DisplayIcon="False" DisplayLink="False" />
                            dnn:ACTIONBUTTON runat="server" ID="dnnACTIONBUTTON4" CommandName="ModuleSettings.Action" DisplayIcon="True" DisplayLink="false" />
                          /div>
                          div class="clear_float"> /div>
                        /div>
                        div class="DeepSkyBlue01_footer"> /div>
                      /div>



                      Thanks
                      S.

                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      These Forums are dedicated to the discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved