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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

SS 3.0 CMS Backend: no content shown, when clicking a menu-link.

Go to End

26 Posts   7484 Views


Community Member, 10 Posts

14 September 2012 at 2:33am

We finally found the solution to this problem, our server returned text/json;charset=UTF-8 for JSON responses.

To fix the problem, open /framework/admin/javascript/LeftAndMain.js and replace the following line:

if(xhr.getResponseHeader('Content-Type') == 'text/json') {


if(xhr.getResponseHeader('Content-Type').indexOf('text/json')===0) {


Community Member, 166 Posts

24 October 2012 at 4:13am

Edited: 24/10/2012 4:36am

Hi Leon223,

Thank you very much for posting the solution - we encountered the same issue of the server returning text/json;charset=UTF-8 for JSON responses. And your patch works.

Just wondering, have you submitted a pull-request for this fix?

I'm surprised more people aren't encountering this issue. Also, the description in Trac ticket #7708 doesn't quite seem to match up with what I was experiencing... content area wouldn't appear if any link, either on the left hand menu or the site tree were clicked. Would only appear after a full refresh. I guess that makes sense, as a full refresh isn't a JSON request and the issue is related to the JSON response Content-Type.

Thanks again.


Community Member, 6 Posts

26 October 2012 at 8:55am

Edited: 26/10/2012 8:55am

I'm still having this issue, latest stable @ 2012-10-26.

The code in /framework/admin/javascript/LeftAndMain.js has been updated to:

382                 // If content type is text/json (ignoring charset and other parameters)
383                 if(xhr.getResponseHeader('Content-Type').match(/^text\/json[ \t]*;?/i)) {

My server is replying with "Content-Type:text/json" but the TinyMCE content editor doesn't appear. Or it does, but only for a fraction of a second.


Community Member, 72 Posts

27 October 2012 at 2:09am

Have encountered this bug with my clients hosting environment, was driving us nuts! Thanks Leon223 for the patch which works like a charm. Hope the Silverstripe Dev team take note.

Cheers :o)


Community Member, 12 Posts

24 January 2013 at 8:08pm

After switching to nginx/php54-fpm configuration and upgrading to the latest silverstripe release (3.0.3) I have found a new problem with in the admin-section of Silverstripe. I think, it is related because the output in the browser is the same as posted some months ago (also see screenshot). Loading the "Products" -Tab admin-section is no problem until clicking within the form and thus firing a xhr request. Using firebug I found that the content-type of the returned data is set to text/html even though the returned content is json encoded. I alreday extended the mime.types of the nginx-configuration but had no luck. reloading the whole page fixes the prolem.

Can anyone tell where and if the content-type of the ajax-response is set within ModelAdmin? Or is there a problem with the nginx configuration? I have made a copy from


Community Member, 7 Posts

26 June 2013 at 9:42pm

I am having the same issue in admin side. Screenshot is attached.


Community Member, 7 Posts

27 June 2013 at 12:42am

Solved the issue.
Remove whitespace before an opening tag, or after a closing tag, in one of the project PHP files.(mysite/code/<php files>)


Community Member, 21 Posts

24 February 2014 at 12:57pm

Thankyou for the thread!!!

Had the same issue in 3.1.2 with uncle cheese's event calendar module. Turns out there was a space/line in one of the php files in the module.
Just submitted a request to fix it on github, hopefully not too many others are having the same problem!!

Thanks prwodux!