Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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 comments issue


Reply


4 Posts   1888 Views

Avatar
Anonymous user

Community Member, 3 Posts

27 March 2011 at 1:05pm

Edited: 27/03/2011 1:06pm

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

Avatar
Nathan Cox

Community Member, 99 Posts

28 March 2011 at 12:44am

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

Avatar
Anonymous user

Community Member, 3 Posts

4 April 2011 at 9:38am

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

and all is working!

thanks,
alex

Avatar
saxophone15

Community Member, 1 Post

4 August 2011 at 11:11am

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.