Copied to clipboard

Flag this post as spam?

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


  • Adam 9 posts 30 karma points
    Nov 23, 2011 @ 08:43
    Adam
    0

    RSS error: " XML declaration allowed only at the start of the document"

    Hi guys,

       I'm getting a few lines of whitespace before the xml declaration. If I save the source, remove the whitespace and reload the edited file, it loads perfectly.

    There is no whitespace in the masterpages though:

     

    <%@ Master Language="C#" MasterPageFile="~/masterpages/uBlogsyBase.master" AutoEventWireup="true" %>
    <%--NOTE: this file must be kept in this format because the xml declaration must be in the first line.--%>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
      <script type="text/C#" runat="server">
        protected override void OnPreRender(EventArgs e)
        {
            Response.Clear();
            Response.ContentType = "text/xml";
            Response.ContentEncoding = System.Text.Encoding.UTF8;
        }
    </script>
    <?xml version="1.0" encoding="UTF-8" ?>
      <umbraco:macro ID="Macro1" runat="server" Alias="uBlogsyRSS" />
    </asp:Content>
    

     

    any thoughts on how to remove the resultant whitespace?

    I'm using Umbraco 4.7.1 and uBlogsy 1.3.6.1

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 23, 2011 @ 08:59
    Jan Skovgaard
    0

    Hi Adam

    Have you tried to make the whole template one line only? That should work although it's ugly.

    /Jan

  • Adam 9 posts 30 karma points
    Nov 23, 2011 @ 09:06
    Adam
    0

    Hi Jan,

    I haven't... I'll give that a go

    Thanks!

  • Adam 9 posts 30 karma points
    Nov 23, 2011 @ 09:12
    Adam
    0

    Nice one. Thanks Jan.

    I removed all whitespace from uBlogsyBase.master and uBlogsyRSS.master et voila!

    It's not pretty, but it works. I guess it could be Visual Studio's text fomatting or something...

Please Sign in or register to post replies

Write your reply to:

Draft