Jump to:

23480 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Error using $PageComments

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: 1196 Views
  • franz1982
    Avatar
    Community Member
    1 Post

    Error using $PageComments Link to this post

    I'm a SilverStripe beginner following the Tutorial 2 (http://doc.silverstripe.org/sapphire/en/tutorials/2-extending-a-basic-site). I find an error when trying to include comments on a page (the news page in the tutorial):

    This page contains the following errors:
    error on line 171 at column 101: EntityRef: expecting ';'
    Below is a rendering of the page up to the first error.

    The error disappear when $PageComments is removed from the .ss file:

    <% include Menu2 %>
    <div id="Content" class="typography">
    <% include Breadcrumbs %>
    <h1>$Title</h1>
    $Content
    <div class="newsDetails">
    Posted on $Date.Nice by $Author
    </div>
    $PageComments
    </div>

    Any help?
    Thanks!

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: Error using $PageComments Link to this post

    It sounds like an XML error. You can either use plain xhtml over text rather than XML by removing the xml header at the top of Page.ss *or* you should be able to make this change - http://open.silverstripe.org/ticket/6610 manually to your installation.

  • mrcl
    Avatar
    Community Member
    8 Posts

    Re: Error using $PageComments Link to this post

    This bug fix does not work for me...

    Adding .ATT do $DeleteAllLink simply makes the Delete stop working!!! Then when it is clicked it goes back to Home.

    Is there anything else that could be done?
    It would be nice to get it sorted.

    Cheers

  • mrcl
    Avatar
    Community Member
    8 Posts

    Re: Error using $PageComments Link to this post

    I had a look and the problem seems to be that $DeleteAllLink generates a & character for the request.
    When publishing anything using the CMS, I noticed that this character (&) screws up the Text Field String to be processed.
    So probably there might be something to be done when generating the string itself, considering this special character.
    That should be carried out at the CMS Text Fields as well.

    Does some one noticed this sort of problem?

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: Error using $PageComments Link to this post

    Adding .ATT do $DeleteAllLink simply makes the Delete stop working!!! Then when it is clicked it goes back to Home.

    Are you sure you don't have a javascript error on the page? What HTML does it generate in the template (or is it blank?)

  • mrcl
    Avatar
    Community Member
    8 Posts

    Re: Error using $PageComments Link to this post

    It generates a link to HOME...
    I am just following the Tutorial 2 and then ended up with this issue. So ther is no extra java script on the top of what standard SilverStirpe Framework does.
    Reading the link you have posted it seems that the guys who were trying that same solution got the same kind of issue...

    At the top of my head nothing come to help me think about a java script issue.

    Regarding what the CMS does, maybe while saving text with special character (e.g. &) it could not treat it right. But this is still standard SS.

    Following all Tutorial 2 steps, till $PageComments, seems to give this same error for other users... (http://www.silverstripe.org/general-questions/show/19064#post313511)
    But I am just a newbie in SS, so if you have anything to help us, that would be nice....

    Cheers

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