+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Bug when renaming page

Bug when renaming page

5 posts, 1 answered
  1. Henrik
    Henrik avatar
    20 posts
    Registered:
    10 Jun 2010
    20 Jul 2010
    Link to this post
    1. Create a new page p { p.aspx }
    2. Add a SiteMenu s
    3. Don't bind s to anything.
    4. Choose template, theme
    5. Save
    6. Edit again
    7. Choose starting node for site menu = { p.aspx }
    8. Save
    9. Edit again
    10. Rename p.aspx to q.aspx
    11. Press the view-tab/browse to the page after saving/view preview.
    12. Could not find the sitemap node with URL '~/p.aspx'.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    20 Jul 2010
    Link to this post
    Hello Henrik,

    StartingNodeUrl uses Telerik.Cms.Web.UI.UrlEditorWrapper which does not work with dynamic urls. This means that when you rename the page the url is not resolved by its id.

    You can use the following selector instead

    [UrlProperty, WebEditor("Telerik.Cms.Web.UI.DhlUrlEditor, Telerik.Cms"), Bindable(true), WebSysDescription("HyperLink_NavigateUrl"), Category("Navigation"), DefaultValue("")]
           public string NavigateUrl
           {
               get
               {
                   return this.navigateUrl;
               }
               set
               {
                   this.navigateUrl = value;
               }
           }
     
           /// <summary>Gets or sets ID to a SitefinityPage</summary>
           /// <value>Sitefinity Page ID.</value>
           [TypeConverter("Telerik.Cms.Web.UI.GuidTypeConverter, Telerik.Cms"), WebEditor("Telerik.Cms.Web.UI.DhlIdEditor, Telerik.Cms"), Category("Navigation"), DefaultValue(typeof(Guid), "00000000-0000-0000-0000-000000000000")]
           public Guid PageId
           {
               get
               {
                   return this.pageId;
               }
               set
               {
                   this.pageId = value;
               }
           }

    or create a custom one CustomWebUITypeEditor

    The web editor should be added in the code behind of SiteMenu control -
    Sitefinity\UserControls\Navigation35\SiteMenu.ascx.cs

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Henrik
    Henrik avatar
    20 posts
    Registered:
    10 Jun 2010
    20 Jul 2010
    Link to this post
    Smoooth
  4. Shivers999
    Shivers999 avatar
    5 posts
    Registered:
    17 Feb 2010
    24 Aug 2011
    Link to this post
    Using this solution on 3.7 SP4, no namespace is found for 'WebSysDescription'. Also, 'navigateUrl' and 'pageId' are not defined.

    What am I doing wrong?
  5. Shivers999
    Shivers999 avatar
    5 posts
    Registered:
    17 Feb 2010
    24 Aug 2011
    Link to this post
    Nevermind. As dangerous as it may be, I just removed the 'StartingNodeURL' control property from the database.
Register for webinar
5 posts, 1 answered