Modules won't show in admin menu

Posted by Community Admin on 05-Aug-2018 23:06

Modules won't show in admin menu

All Replies

Posted by Community Admin on 02-Sep-2010 00:00

Hello,


Following the Jobs module example from the SDK I created a Migration module. I followed the steps in the video from this thread - only instead of "Jobs" everywhere I have "Migration". I attach a screenshot of my settings and you can download the Class Library project from here.

I add a project reference from my main SF 4.0 project to the Migration project. When enter these settings, check the "Install" checkbox, restart the web server and start debugging the site I successfully hit a breakpoint set in the first line of public override void Install(SiteInitializer initializer). I track down the execution of Install and it completes successfully. I'm using the same Guids for landingPage and subPage as in the Jobs example but that's ok, because I don't have this module installed.

But I still can't make the "Migration" menu item to show under the Content menu. I deleted my Temporary ASP.NET files, cleared the browser cache, restarted the computer twice and still nothing. I noticed that there are no records in sf_page_node and sf_page_data tables with id/content_id of 13FA3CB0-6F00-4DFB-A534-28EA60252A16 and A52C36E1-3D29-4F39-BB8D-BB1F064E556A, which should be the Guids of the backend pages. I don't know if this is important, but I'm using the built-in Cassini webserver.

Regards,
Lupi

Posted by Community Admin on 03-Sep-2010 00:00

Make sure you are checking the "Install" checkbox on the configuration screen. This is not listed in the documentation, but, it does need to be checked.

Posted by Community Admin on 03-Sep-2010 00:00

Hello,

Yes, Install should be checked. Make sure that you have build the solution before all changes. Let me know if the problem still exist.

Kind regards,
Ivan Dimitrov
the Telerik team


Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Posted by Community Admin on 03-Sep-2010 00:00

I did check the Install checkbox, that's why I hit the breakpoint in the void Install() method of my module. The module obviously installs, but won't show in the admin menu. I also cleaned and rebuilt the solution several times.


Any other cache I'm not aware of that might need cleaning?

Posted by Community Admin on 03-Sep-2010 00:00

Not sure if it will help, but, you could also read this post, I had lots of problems with the install also:

Posted by Community Admin on 14-Sep-2010 00:00

Hello,

Here is a sample code for a module that runs fine at my end. "Install" checkbox should be selected and application restarted. If the module do not appear after the first restart do a second or flush the site map, because we are creating a new node in navigation and the nodes could be still cached.

class SampleModule : ModuleBase
   
       public override Guid LandingPageId
       
           get
           
               return SampleModule.landingPageId;                    
           
       
 
       public override Type[] Managers
       
           get
           
               return null;
           
       
 
       public override void Initialize(ModuleSettings settings)
       
           base.Initialize(settings);
       
 
       public override void Install(Telerik.Sitefinity.Abstractions.SiteInitializer initializer)
       
           base.Install(initializer);
 
           var _SiteInitializerNode = initializer.PageManager.GetPageNode(SiteInitializer.ModulesNodeId);
           var _pageManager = initializer.PageManager;
 
 
           var sNode = _pageManager.GetPageNodes().Where(p => p.Id == nodeId).SingleOrDefault();
           if (sNode == null)
           
               sNode = initializer.CreatePageNode(nodeId, _SiteInitializerNode);
 
               sNode.Name = "IvanModule";
               sNode.ShowInNavigation = true;
               sNode.Attributes["ModuleName"] = "IvanModule";
               sNode.Title = "IvanModule";
               sNode.UrlName = "IvanModule";
           
 
           var id = landingPageId;
           var landingPage =
               _pageManager.GetPageNodes()
               .SingleOrDefault(p => p.Id == landingPageId);
           if (landingPage == null)
           
               var pageInfo = new PageElement()
               
                   PageId = landingPageId,
                   Name = "IvanModuleName",
                   MenuName = "IvanModuleMenuName",
                   UrlName = "IvanModuleUrl",
                   Description = "IvanModuleDesc",
                   HtmlTitle = "IvanModuleHtmlTitle",
                   IncludeScriptManager = true,
                   ShowInNavigation = false,
                   EnableViewState = false,
                   TemplateName = SiteInitializer.BackendTemplateName
               ;
 
               var panel = new Literal();
               initializer.CreatePageFromConfiguration(pageInfo, sNode, panel);
           
 
       
       public static readonly Guid landingPageId = new Guid("597E0C2B-F1D3-4386-BB7F-714C640573B3");
       public static readonly Guid nodeId = new Guid("006F8DC0-4576-43AB-BE64-544C21007852");
 
   



Kind regards,
Ivan Dimitrov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

This thread is closed