Copied to clipboard

Flag this post as spam?

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


  • hetaurhet 245 posts 267 karma points
    Feb 14, 2012 @ 10:49
    hetaurhet
    0

    Rss page error

    hello

    when I click on Subscribe link on landing page. It opens /rss/ page showing following error.

    XML Parsing Error: XML or text declaration not at start of entity
    Location: http://mydomain.com/rss/
    Line Number 2, Column 5:    <?xml version="1.0" encoding="UTF-8" ?><div style="border: 1px solid #990000">Error loading Razor Script /uBlogsy/uBlogsyRSS.cshtml</br/>String cannot be of zero length.
    ----^

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 14, 2012 @ 17:50
    Anthony Dang
    0

    Try this...

    Replace the line with string blogUrl

    with

     

        string blogUrl = Request.Url.AbsoluteUri
                                .Replace(Model.NiceUrl(), string.Empty)
                                .TrimEnd("/".ToCharArray());
    
        if (!string.IsNullOrWhiteSpace(qs))
        {
            blogUrl = blogUrl.Replace(qs, string.Empty).Replace("?", string.Empty);
        }
  • Streety 358 posts 568 karma points
    Feb 14, 2012 @ 17:59
    Streety
    0

    Going a bit bonkers with this one myself.

     

    I have tried:

    1.  Moving all the Template syntax to one line in the template. Nop!
    2. Changing the masterpage to "~/umbraco/masterpages/default.master"
    3. Removing the macro alltogether

    The backend razor is different calling differnent libraries.

    I am a bit stuck. I can't really use this version unless I can get RSS going.

    Firefox shows the error and IE shows a blank page. Its doesn't seem to matter where the RSS object is within the Umbraco heirarchy.

    Perhaps Mr Dang if you would like to look at this site online I can supply credentials. I am sure you would fix in a jiffy.

    Thank anyway if you can't.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 14, 2012 @ 18:10
    Anthony Dang
    0

    Email me the login details - my twit handle at g m@il d0t c0m

  • Streety 358 posts 568 karma points
    Feb 14, 2012 @ 18:11
    Streety
    0

    Hmmm.

     

    Getting new error with the code change:

      <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0">
    --^

     

    Old error:

      <?xml version="1.0" encoding="UTF-8" ?>Error loading MacroEngine script (file: /uBlogsy/uBlogsyRSS.cshtml)
    --^

  • Streety 358 posts 568 karma points
    Feb 14, 2012 @ 18:19
    Streety
    0

    Test mail sent

  • Streety 358 posts 568 karma points
    Feb 14, 2012 @ 18:30
    Streety
    0

    Must be the wrong email address

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 14, 2012 @ 18:30
    Anthony Dang
    0

    No email yet.

     

     

  • Streety 358 posts 568 karma points
    Feb 14, 2012 @ 18:51
    Streety
    0

    Thanks again Anthony for fixing.

    Not sure what the bug was yet!

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Feb 14, 2012 @ 18:58
    Anthony Dang
    1

    What I did...

    Ensured that rss master page parent was the Umbraco master.
    Created a new uBlogsyRSS.cshtml because Umbraco was not allowing saving when under a folder. A bit annoying. Ensured that there were no starting or trailing spaces and linebreaks

    I also removed any trailing spaces in the rss masterpage by making the markup more compact. Hardly noticable to the human eye but RSS feeds tend to break due to a new line or space (or even an invisible character) which you don't even know is there.

     

  • hetaurhet 245 posts 267 karma points
    Feb 16, 2012 @ 14:03
    hetaurhet
    0

    thanks anthony.

    It solved my problem too. replaced string blogUrl line and removed white spaces/line breaks from template.

  • wolulcmit 357 posts 693 karma points
    Feb 07, 2014 @ 09:24
    wolulcmit
    0

    removing the top line comment
    @*
        RSS layout.
    *@
    fixed the issue for me, which seems a bit ridiculous.... but if it helps anyone else, try it.

Please Sign in or register to post replies

Write your reply to:

Draft