Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjarne Fyrstenborg 1280 posts 3990 karma points MVP 7x c-trib
    Jun 11, 2013 @ 11:39
    Bjarne Fyrstenborg
    0

    Get wrong url in rss for blog posts

    Hi..

    In uBlogsyRSS.cshtml file there in these lines to get the blog url and insert it in the rss feed.

    // get blog url
    string blogUrl = Request.Url.AbsoluteUri
            .Replace(Model.NiceUrl(), string.Empty)
            .TrimEnd("/".ToCharArray());

    and then inserts it in the item node:

    <item>
                        <title>@p.GetProperty("uBlogsyContentTitle").Value</title>
                        <author>@p.GetProperty("uBlogsyPostAuthor").Value</author>
                        <comments>@[email protected]</comments>
                        <description>@p.GetProperty("uBlogsyContentBody").Value.StripHtml().Trim()</description>
                        <link>@[email protected]</link>
                        <guid>@[email protected]</guid>
                        <pubDate>@p.GetProperty("uBlogsyPostDate").Value.FormatDateTime("ddd, dd MMMM yyyy HH:mm:ss") </pubDate>
                    </item>                

    But when it doesn't seem to replace with Model.Id?

    I get a link like this:

    http://www.mydomain.dk/blog/rss.aspx/blog/posts/2013/link-to-my-post/

     

    But when I change the blogUrl to this and just insert a static string I get a correct url:

    // get blog url
    string blogUrl = Request.Url.AbsoluteUri
            .Replace("/blog/rss.aspx", string.Empty)
            .TrimEnd("/".ToCharArray());

    which give me this link:

    http://www.mydomain.dk/blog/posts/2013/link-to-my-post/

    I have installed uBlogsy v. 2.1.1.2 and I am using Umbraco v. 4.11.9 ..

    /Bjarne

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jun 11, 2013 @ 15:27
    Anthony Dang
    0

    Thanks.

    I'll look into it.

     

Please Sign in or register to post replies

Write your reply to:

Draft