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.

Customising the CMS /

ContentNegotiator::disable() not working?


Reply


2 Posts   1115 Views

Avatar
Anatol

126 Posts

3 April 2009 at 5:32pm

Edited: 03/04/2009 5:34pm

Hi,

does anyone know if the [url=http://doc.silverstripe.com/doku.php?id=ContentNegotiator]ContentNegotiator[/url] doesn't work any more?

I added the following to my _config.php :

ContentNegotiator::disable();

But the type remains 'application / xhtml+xml' - shouldn't this change to 'text/html'?

I used the same code on pretty much the same page in Silverstripe 2.2.2 and the type was 'text/html'.

Cheers!
Anatol

Avatar
Anatol

126 Posts

3 April 2009 at 5:55pm

I removed

<?xml version="1.0" encoding="UTF-8"?>

from the template and it worked as text/html. It's still strange that there is a difference between Silverstripe 2.2.2 and 2.3.1. My 2.2.2 version had the <?xml ... bit.

(If you are wondering why I want to change the type: I need to use 'text/html' to be able to use the Google Maps API. It doesn't seem to work with 'application / xhtml+xml')

Cheers!
Anatol