Jump to:

23483 Posts in 18976 Topics by 2878 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, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3 4
Go to End
Author Topic: 3927 Views
  • Leon223
    Avatar
    Community Member
    10 Posts

    Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link. Link to this post

    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) {

  • vwd
    Avatar
    Community Member
    158 Posts

    Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link. Link to this post

    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.

  • illektr1k
    Avatar
    Community Member
    6 Posts

    Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link. Link to this post

    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.

  • bod
    Avatar
    Community Member
    72 Posts

    Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link. Link to this post

    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)

  • snel
    Avatar
    Community Member
    10 Posts

    Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link. Link to this post

    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

  • prwodux
    Avatar
    Community Member
    7 Posts

    Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link. Link to this post

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

    Attached Files
  • prwodux
    Avatar
    Community Member
    7 Posts

    Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link. Link to this post

    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>)

  • monk
    Avatar
    Community Member
    5 Posts

    Re: SS 3.0 CMS Backend: no content shown, when clicking a menu-link. Link to this post

    Dude, I want to marry you. thanks a lot!

    3927 Views
Page: 1 2 3 4
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.