21285 Posts in 5732 Topics by 2602 members
General Questions
SilverStripe Forums » General Questions » SS 3.0 CMS Backend: no content shown, when clicking a menu-link.
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | ||
| Author | Topic: | 1450 Views |
-
Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link.

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') {
With:
if(xhr.getResponseHeader('Content-Type').indexOf('text/json')===0) {
-
Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link.

24 October 2012 at 4:13am Last edited: 24 October 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.
VWD. -
Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link.

26 October 2012 at 8:55am Last edited: 26 October 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.
-
Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link.

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)
-
Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link.

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 http://sspaste.com/paste/show/505bf25860775
| 1450 Views | ||
| Go to Top |




