More in this section
Forums / Sitefinity SDK / Module Installation Errors

Module Installation Errors

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
4 posts, 0 answered
  1. Joe Keller
    Joe Keller avatar
    48 posts
    Registered:
    07 Apr 2010
    01 Sep 2010
    Link to this post
    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 t1.id =
  2. Joe Keller
    Joe Keller avatar
    48 posts
    Registered:
    07 Apr 2010
    01 Sep 2010
    Link to this post
    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
            {
                get
                {
                    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
            {
                get
                {
                    return UserTrackingModule.subPageId;
                }
            }
     
            public override Type[] Managers
            {
                get
                {
                    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();

  3. Joe Keller
    Joe Keller avatar
    48 posts
    Registered:
    07 Apr 2010
    01 Sep 2010
    Link to this post
    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.

  4. fregas baratis
    fregas baratis avatar
    185 posts
    Registered:
    14 Nov 2002
    26 May 2011
    Link to this post
    Why would that matter?  Isn't it the same guid, regardless of whether you get to it thru a property or an instance variable?
4 posts, 0 answered