Jump to:

1347 Posts in 439 Topics by 514 members

Themes

SilverStripe Forums » Themes » Silverstripe 3 possible bug inserting blank lines at the top of all pages

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 665 Views
  • Beau
    Avatar
    Community Member
    5 Posts

    Silverstripe 3 possible bug inserting blank lines at the top of all pages Link to this post

    It appears that Silverstripe 3 may be inserting blank lines into the <body> of my html. Is anyone else getting an empty space at the top of their pages (website, and admin pages including CMS and dev/build)?

    It appears that it could have something to do with this meta tag, but only because nothing else in my templates appears to affect this blank space at all:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    I have tried changing to the "Simple" theme provided with Silverstripe and this blank space still appeared, so I am wondering if it could be a bug with Silverstripe 3, or perhaps something in my code could be causing it.

    It seems to manifest itself as empty space within double quotes directly inside the <body> tags, but this code only appears when inspecting with dev tools, it doesnt come up when viewing source code.

    Can anyone shed any light on this issue at all?

    I am using SS version 3.0.3.

    Thanks

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Silverstripe 3 possible bug inserting blank lines at the top of all pages Link to this post

    This can sometimes happen if you have trialing whitespace after a ?> tag in your PHP files. Check your custom PHP code so that they don't include the ?> tag.

  • Beau
    Avatar
    Community Member
    5 Posts

    Re: Silverstripe 3 possible bug inserting blank lines at the top of all pages Link to this post

    That would make sense as I had narrowed it down to what is most likely an issue in my PHP files. The problem isn't present on another site I am working on

    I searched out and found a couple of stray closing ?> tags but it doesn't appear to have resolved the issue (flushed cache after updates).

    Any other thoughts along the same lines? It would seem to me to be most likely something in my PHP files, but I wonder if it's possible content that has been pasted in through the CMS could affect a site in this way?

    I have the SortableGridField module installed but I have it a go without it and there was no change.

    So frustrating I know in the end it will be some tiny yet obvious thing I have done wrong that has caused this issue which makes it even worse!

    665 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.