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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

ContentNegotiator::disable() not working?


Go to End


2 Posts   1765 Views

Avatar
Anatol

126 Posts

3 April 2009 at 5:32pm

Edited: 03/04/2009 5:34pm

Hi,

does anyone know if the ContentNegotiator 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