Module Installation Errors - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Module Installation Errors

  • Module Installation Errors
  • I am getting the following exception from my module install code, what does it mean?

    line 1:127: unexpected token: ["",<1>,line=1,col=127]
    Original Query: DEFINE EXTENT extnt FOR Telerik.Sitefinity.Pages.Model.PageNode; SELECT * FROM extnt AS t1  WHERE t1.appName =  $1 AND =
  • FYI - Here is my module code.. I took it from the JobsModule example

    using System;
    using System.Linq;
    using Telerik.Sitefinity.Services;
    using Telerik.Sitefinity.Abstractions;
    using Telerik.Sitefinity;
    using Telerik.Sitefinity.Libraries.Model;
    using Telerik.Web.UI;
    using Telerik.Sitefinity.Model;
    using Telerik.Sitefinity.Modules.Pages.Configuration;
    using Telerik.Sitefinity.Pages.Model;
    using Telerik.Sitefinity.Configuration;
    namespace UserTracking
        public class UserTrackingModule : ModuleBase
            public const string ModuleName = "UserTracking";
            //pre generated guid as the ID for this page in the database
            public static readonly Guid landingPageId = new Guid("B6F1EBE7-24F5-4103-8098-C57EC4804E79");
            public override Guid LandingPageId
                    return UserTrackingModule.landingPageId;
            //pre generated guid as the sub page for this module in the database
            public static readonly Guid subPageId = new Guid("DB99FD93-BD14-4539-BA72-30F2FDDC31AE");
            public Guid SubPageId
                    return UserTrackingModule.subPageId;
            public override Type[] Managers
                    return null;
            public override void Install(SiteInitializer initializer)
                var moduleNode = initializer.PageManager.GetPageNode(SiteInitializer.ModulesNodeId);
                var pageManager = initializer.PageManager;
                var userTrackingNode = pageManager.GetPageNodes().Where(p => p.Id == LandingPageId).SingleOrDefault();
                if (userTrackingNode == null)
                    userTrackingNode = initializer.CreatePageNode(LandingPageId, moduleNode);
                    userTrackingNode.Name = "UserTracking";
                    userTrackingNode.ShowInNavigation = true;
                    userTrackingNode.Attributes["ModuleName"] = UserTrackingModule.ModuleName;
                    userTrackingNode.Title = "UserTracking";
                    userTrackingNode.UrlName = "UserTracking";
                var subPage = pageManager.GetPageNodes().Where(p => p.Id == SubPageId).SingleOrDefault();
                if (subPage == null)
                    var pageInfo = new PageElement()
                        PageId = SubPageId,
                        Name = "UserTrackingConfiguration",
                        MenuName = "UserTrackingConfiguration",
                        UrlName = "UserTrackingConfiguration",
                        Description = "User Tracking Configuration",
                        ShowInNavigation = false,
                        TemplateName = SiteInitializer.BackendTemplateName
                    pageInfo.Parameters["ModuleName"] = UserTrackingModule.ModuleName;
                    var control = new UserTrackingConfiguration();
                    var node = initializer.CreatePageFromConfiguration(pageInfo, userTrackingNode, control);

    The error occurs on this line:
    var userTrackingNode = pageManager.GetPageNodes().Where(p => p.Id == LandingPageId).SingleOrDefault();

  • ok, I figured this one out.... in this line of code....

    var userTrackingNode = pageManager.GetPageNodes().Where(p => p.Id == LandingPageId).SingleOrDefault();

    I had used LandingPageID - the property, and not landingPageID, the variable.
    Simple mistake, took all day to find it though.

  • Why would that matter?  Isn't it the same guid, regardless of whether you get to it thru a property or an instance variable?