This project is read-only.

New Problem - just found that Lead Story does not appear when not logged in

Topics: Themes
May 24, 2013 at 2:46 PM
I just happened to be not logged in - noticed that the Lead Story does not appear when not logged in but appears if logged in as Admin.
Any idead why this is happening?
Code from site.master in theme:
rotected void Page_Load(object sender, EventArgs e)
        var url = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) + "/";
        string domainName = Request.Url.Host.ToString();
        if (Request.RawUrl.ToLower().Equals("/default.aspx") | Request.RawUrl.ToString().Equals("/") | (Request.Url.Equals("")))
           // string query = Request.QueryString["theme"]
            string theme =  BlogSettings.Instance.Theme;
            string path = string.Concat(Utils.RelativeWebRoot, "themes/", theme, "/PostLeadStory.ascx");

            PostViewBase postView = (BlogEngine.Core.Web.Controls.PostViewBase)LoadControl(path);
            postView.ShowExcerpt = true;// BlogSettings.Instance.ShowDescriptionInPostList;
            //just set a temp post to show - for not getting error
            Post tmp = BlogEngine.Core.Post.Posts[0];
            postView.Post = tmp;
            postView.ID = "sdfsdfsf";// tmp.Id.ToString().Replace("-", string.Empty);
            postView.Location = ServingLocation.PostList;

May 26, 2013 at 11:38 AM
May 26, 2013 at 10:19 PM
Check the posting date/time, maybe your BE time is not set correctly. This would only make the post visible when logged in as admin and not visible to others.