Jump to:

22977 Posts in 11731 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » Creating a link breaks page rendering?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 581 Views
  • scpi
    Avatar
    Community Member
    19 Posts

    Creating a link breaks page rendering? Link to this post

    I'm having a strange problem that I haven't had much luck solving.
    I'm on SS version 2.4.2.

    I have one specific page where, if I try to add a link anywhere in the page, the page renders without the main Content area. I get the header, footer, navigation, and everything else, but the content area is empty. It happens no matter what page I create a link to. And I don't have this problem with any other page on the site.

    This is largest page on the site, and it also changes the most frequently. Other than that though, I don't think there's anything special about it. There's nothing wrong I can see with the HTML in the page, and nothing is showing up in my PHP error logs. I'm starting to think there could be bad data in my database somewhere, but I don't even know where to begin to look.

    Has anybody had anything like this happen to them, or at least have some ideas for the next step in troubleshooting?

    -scott

  • dendeffe
    Avatar
    Community Member
    135 Posts

    Re: Creating a link breaks page rendering? Link to this post

    What's your template like? What does it output? Any special functions in your Model/controllers? Parsing stuff (something along these lines http://www.ssbits.com/tutorials/2010/2-4-using-short-codes-to-embed-a-youtube-video/) Any special _config.php settings? What do you see in the source code editor in the CMS?

  • scpi
    Avatar
    Community Member
    19 Posts

    Re: Creating a link breaks page rendering? Link to this post

    Source view in the CMS is totally normal. The template outputs a normal HTML page, it's just missing everything from the Content area. There's not much really special in my code, and the code hasn't even changed recently! I'm starting to think there might be corrupt data in the database.

    Using var_dump($this) in my Page_Controller index shows that all the content is there in the Page object.

    If I code the link by hand as <a href="/example-page/">link</a>, it works fine.
    If I create the link in the CMS so it's <a href="[sitetree_link id=42]">link</a>, it breaks.

  • dendeffe
    Avatar
    Community Member
    135 Posts

    Re: Creating a link breaks page rendering? Link to this post

    Not sure how the links are rendered for the frontend. But I think sapphire/parsers might be a good place to start to see if something there clashes with some code you are having.

    581 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.