17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1103 Views |
-
Call to undefined method HttpResponse::setBody()

1 September 2008 at 10:16pm
After installation I get this error msg when browsing my new site...
What does it mean and how can I fix it?Fatal error: Call to undefined method HttpResponse::setBody() in /home/wales4je/public_html/sapphire/core/control/ContentNegotiator.php on line 104
Regards,
Z
-
Re: Call to undefined method HttpResponse::setBody()

1 September 2008 at 10:54pm Last edited: 1 September 2008 10:55pm
I looked at the function, and I think it might have something to do with your template. (or I am way off =)
function html(HTTPResponse $response) {
$response->addHeader("Content-type", "text/html; charset=" . self::$encoding);
$response->addHeader("Vary", "Accept");$content = $response->getBody();
$content = ereg_replace("<\\?xml[^>]+\\?>\n?",'',$content);
$content = str_replace(array('/>','lang','text/html'),array('>','lang','text/html'), $content);
$content = ereg_replace('<!DOCTYPE[^>]+>', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', $content);
$content = ereg_replace('<html xmlns="[^"]+"','<html ', $content);
$response->setBody($content);
}What are the first 2 lines of your yourtheme/templates/Page.ss?
Try adding this.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" lang="en"> -
Re: Call to undefined method HttpResponse::setBody()

2 September 2008 at 2:21am
As suggested, I have made sure that all the .ss files begin with the html stated - they now all do. However, on trying to flush the cache using ?flush=1, I still get the same error, and i'm unsure if the flush did infact work...
thanks,
Z
-
Re: Call to undefined method HttpResponse::setBody()

2 September 2008 at 4:17am
The error has now changed (i reuploaded the negociator file, to make sure it was clean)...
I now get...Fatal error: Call to undefined method HttpResponse::addHeader() in /home/wales4je/public_html/sapphire/core/control/ContentNegotiator.php on line 95
Same function - different line??
Any ideas?
-
Re: Call to undefined method HttpResponse::setBody()

2 September 2008 at 6:42am
I never fixed this - so am going for a fresh install.... thanks everyone.
| 1103 Views | ||
|
Page:
1
|
Go to Top |


