21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 154 Views |
-
Bug in Sapphire controller class?

12 April 2012 at 11:30pm
Hello,
One of my sites got page comment turned on but firefox throws up an error:
XML Paring Error: not well-formed
Location: ...
Line Number ....<p id='DelteComments'><a href='http://localhost/PageComment/delteallcomments?pageid=1&SecurittyID=12312318234jdshsfds'>
---------------------------------------------------------------------------------^I traced it up and find this is caused by the static function join_links()
at this file sapphire/core/control/Controller.php
I therefore have to add 2 lines before
return $result;$result = str_replace('&', '&', $result);
$result = str_replace('&', '&', $result);Am I doing the right thing? As I am a new user (just a couple of days) of SS and I am not sure it is a bug and should report this via the right channel
Ben
-
Re: Bug in Sapphire controller class?

13 April 2012 at 7:10pm
It is a bug in the comments area which should be fixed (just a matter of updating the link function in template to use $DeleteAllLink.ATT rather than $DeleteAllLink
You can also not use strict XML:
http://www.silverstripe.org/general-questions/show/16359#post301479 -
Re: Bug in Sapphire controller class?

13 April 2012 at 11:40pm Last edited: 13 April 2012 11:40pm
Many Thanks Will.
I don't think I can change the template either because the template file is at
cms/templates/PageCommentInterface.ss
I therefore think the Core controller should be fixed as the link it generates is not well-xml formated, and that's the ROOT reason.
I guess for now I either fix the bug myself in the Controller or use non-strict XML.
regards,
Ben -
Re: Bug in Sapphire controller class?

14 April 2012 at 10:32am
You can override any templates in your theme. This is one of the great things about SS. So if you want to edit a 'core' template i.e ms/templates/PageCommentInterface.ss just copy that file to yourtheme/templates folder and you can alter as you want. You don't want to escape content from random parts all over the place as you'll end up in instances of double encoding.
| 154 Views | ||
|
Page:
1
|
Go to Top |


