We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25186
    • 25 Posts
    Hi everybody !

    I’m currently facing a somewhat weird problem with modx : 3 blank lines are added at the top of each page sent back to the user’s browser (have a look at the 3 first lines the html code on http://www.film-critik.net).

    As long as this happens in the html pages, I don’t really care, but it bugs me more when modx does it in my rss/atom feed, because when you click on it (with firefox), an XML error is displayed because of that blank lines, although the content is correct (google reader reads it without any problem).
    The same occurs with my Google sitemap file, google reads it without problem but displays a warning.

    Has anyone any idea about how I could get rid of these blank lines ?

    Thanks a lot in advance,

    rmic.

    PS : I’m running modx 0.9.6 on a Linux apache server, I get the problem with Firefox on linux, but the same error occurs with other browsers / crawlers).
      • 13577
      • 302 Posts
      I’m going to ask the obvious (I’m a believer in check the simple stuff first)-

      Does your template include blank lines? I’ve never seen this problem before but code at that point typically comes from the template.
        Standard Disclaimer
        I could be totally wrong.
        • 25186
        • 25 Posts
        I thought of that too, and there’s no blank lines in the template, and in fact it also happens with the "blank" template ...
          • 22303 MODX Staff
          • 10,725 Posts
          This is generally a result of pure php files being saved with extra line feeds after the closing PHP tag, producing the "magic white space" you are seeing. I’m going through the major core files now, making sure there are no extra line feeds saved in them, but you also might want to check any custom files you may be including in snippets, plugins, etc.

          I don’t see any in the core files at first glance, but there may be an obscure include that is causing this somewhere...
            • 22303 MODX Staff
            • 10,725 Posts
            Actually, I see several language files, including the main english.inc.php that have this phenomenon. That’s one line feed; I’m searching for the others. And I’ll get this resolved as soon as possible in conjunction with posting a new translation file for comparing changes since 0.9.6 release.

            Looks like two more might be coming from Ditto’s request.extender.inc.php.
              • 25186
              • 25 Posts
              Thanks a lot for helping, I’ll also have a look at this and I’ll let you know if I find something that solves my problem...