17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1559 Views |
-
Blog (.1) showing blank page on 2.2.2 related to BBCodeParser

10 September 2008 at 3:38am
I was pulling my hair out last night trying to get the blog module to show properly using the BlogHolder and BlogEntry templates. Every time I tried to access the blog template, it would display a blank page. Did a few searches on the forum, turns out a few other people have this issue, but a fix was not available as it seems to be a scattered issue... which leads me to believe it's something on the server end?
After digging through the code, I found the culprit to be related to the BBCodeParser... if I removed any calls to it then the page would load fine. If the BBCodeParser was included, then it would not display. Any idea how I can get the BBCodeParser to function properly? Or should I remove it entirely.
I'm building this on a HostGator shared server.
-
Re: Blog (.1) showing blank page on 2.2.2 related to BBCodeParser

10 September 2008 at 4:21am
The BlogHolder page works as intended after commenting out the BBCodeParser, but the blog summary is filled with line breaks... which are not present on the BlogEntry page.
-
Re: Blog (.1) showing blank page on 2.2.2 related to BBCodeParser

10 September 2008 at 5:39am
Use a trunk build in the svn.
-
Re: Blog (.1) showing blank page on 2.2.2 related to BBCodeParser

10 September 2008 at 1:50pm
Hey,
I've been having similar issues to this - always getting a blank page for the blog pages.
I narrowed the problem down to the BBCodeParser.
Basically something goes wrong if you have the BBCodeParser installed as a Pear library - maybe php includes the wrong one?Anyway I remove the BBCodeParser.php and BBCodeParser directory from your PEAR include directory it starts working fine.
I'm still looking for a slightly better work around - will post if I find one (and I'll log a bug too)Robbie
-
Re: Blog (.1) showing blank page on 2.2.2 related to BBCodeParser

10 September 2008 at 3:48pm
Ok so the problem lies in the code to add filters:
line 216 of sapphire/parsers/HTML/HTMLBBCodeParser.php:
@include_once 'BBCodeParser/Filter/'.$filter.'.php';The @ silences the errors which is a problem in itself.
Then when the filter file is include (eg Basic.php)
line 31: require_once 'HTML/BBCodeParser/Filter.php';This is meant to include sapphire/parsers/HTML/BBCodeParser/Filter.php but actually includes from the pear include directory - since that comes first in my include path.
So the solution is to change the following line in sapphire/_config.php:
set_include_path(get_include_path() . PATH_SEPARATOR . $path);to:
set_include_path(str_replace('.' . PATH_SEPARATOR, '.' . PATH_SEPARATOR . $path . PATH_SEPARATOR, get_include_path()));Thus putting the parsers directory ahead of the pear dir in the php include path. Or alternatively you could change the individual filter files to use relative paths for includes.
PATCH IS ATTACHED
-
Re: Blog (.1) showing blank page on 2.2.2 related to BBCodeParser

10 September 2008 at 7:20pm
Related ticket is here http://open.silverstripe.com/ticket/2790
Including patches
| 1559 Views | ||
|
Page:
1
|
Go to Top |


