Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » page comments issue

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: 1776 Views
  • Anonymous user
    Avatar
    Community Member
    3 Posts

    page comments issue Link to this post

    Hello,

    Working on the tutorial part 2 and checked "add comments on this page" within the CMS,and now the page gets this error:

    XML Parsing Error: not well-formed
    Location: http://localhost/ss245/about-us/
    Line Number 107, Column 107: <p id="DeleteComments"><a href="http://localhost/ss245/PageComment/deleteallcomments?pageid=2&SecurityID=382b0f9a00ab9c3777c112db57d31d8756811ddb">
    ------------------------------------------------------------------------------------------------------------------------^

    I've done the ?flush=1, and out of desperation even ran dev/build... but to no avail.
    This is what I've added to the layout page - $PageComments. Doesn't really seem to matter what .ss page I add it to, always comes up with same error.

    As soon as I uncheck "add comments on this page", everything works just fine.

    Using version 2.4.5 I just downloaded the other day.

    Thanks for any help on this,
    Alex

    ----------------------------------------------------------------------------------

    Playing with this a bit further I discovered switching the theme to blackcandy comments work fine. Switch it back to the tutorial theme and the issue comes back. All the html looks just fine, I mimicked the code the same way it was done in blackcandy. Not really a issue I need to solve, just trying to learn but I am curious as to why?

    thanks

  • Nathan Cox
    Avatar
    Community Member
    99 Posts

    Re: page comments issue Link to this post

    I'm fairly sure the problem is that $PageComments outputs a URL with an unencoded & in it, and the tutorial theme is XML encoded, so it's throwing a major wobbly because the & is invalid XML.

    Try remove <?xml version="1.0" encoding="UTF-8"?> from the top of Page.ss

  • Anonymous user
    Avatar
    Community Member
    3 Posts

    Re: page comments issue Link to this post

    Yep I wondered the same thing, switched it to
    <!DOCTYPE html>
    <html lang="$ContentLocale">

    and all is working!

    thanks,
    alex

  • saxophone15
    Avatar
    Community Member
    1 Post

    Re: page comments issue Link to this post

    I had this same problem and this thread really helped me out.

    SilverStripe should update the tutorial files to fix this problem. Regardless, I really like how SilverStripe works so far.

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