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.

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

Silverstripe 3.1.2, CMS error, links don`t work


Go to End


1134 Views

Avatar
tutanton

Community Member, 1 Post

22 November 2013 at 12:28pm

Edited: 22/11/2013 12:45pm

I`ve installed Silverstripe 3.1.2 (with composer) and none of links in CMS work.
No plugins.
NGNIX 1.4.1

I found problem
/framework/javascript/jquery-ondemand/jquery.ondemand.js
after line 93 variable jsIncludes contain item with whitespace on beginning

So, i fixed it by adding replace
var jsIncludePath = decodePath(jsIncludes).replace(/^\s+/, '');

var newJsIncludes = [];
if(xhr.getResponseHeader && xhr.getResponseHeader('X-Include-JS')) {
    var jsIncludes = xhr.getResponseHeader('X-Include-JS').split(',');     
    for(var i=0;i<jsIncludes.length;i++) {
        var jsIncludePath = decodePath(jsIncludes).replace(/^\s+/, '');
        if(!$.isItemLoaded(jsIncludePath)) {
            newJsIncludes.push(jsIncludePath);
        }
    }
}

var jsIncludes = xhr.getResponseHeader('X-Include-JS').split(',');
console.log(jsIncludes);

["/assets/_combinedfiles/lib.js?m=1385075649", "/framework/thirdparty/tinymce/tiny_mce_gzip.php?m=…es=advanced&languages=en&diskcache=true&src=false", "/assets/_combinedfiles/leftandmain.js?m=1385068593", "/cms/javascript/ReportAdmin.js?m=1383868747", " /assets/_combinedfiles/lib.js?m=1385075649", "/framework/thirdparty/tinymce/tiny_mce_gzip.php?m=…es=advanced&languages=en&diskcache=true&src=false", "/assets/_combinedfiles/leftandmain.js?m=1385068593", "/cms/javascript/ReportAdmin.js?m=1383868747"]

And i don`t see this spaces in response headers

Response Headers

HTTP/1.1 200 OK
Server: nginx/1.4.1
Date: Thu, 21 Nov 2013 23:03:05 GMT
Content-Type: text/json
Content-Length: 5860
Connection: keep-alive
X-Powered-By: PHP/5.3.27-1~dotdeb.0
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-cache, max-age=0, must-revalidate, no-transform
Pragma: no-cache
Set-Cookie: PastMember=1; expires=Wed, 19-Feb-2014 23:03:05 GMT; path=/; httponly
X-Controller: CMSPagesController
X-Title: SilverStripe+-+Pages
X-Frame-Options: SAMEORIGIN
X-Include-JS: /assets/_combinedfiles/lib.js?m=1385074413,/framework/thirdparty/tinymce/tiny_mce_gzip.php?m=1384281824&js=1&plugins=table%2Cemotions%2Cpaste%2Cmedia%2Cfullscreen%2Cinlinepopups%2Cadvimagescale&themes=advanced&languages=en&diskcache=true&src=false,/assets/_combinedfiles/leftandmain.js?m=1385068593,/assets/_combinedfiles/cmsmain.js?m=1385027903,/framework/thirdparty/jquery-ui/datepicker/i18n/jquery.ui.datepicker-en.js?m=1384281824
X-Include-CSS: /framework/admin/thirdparty/jquery-notice/jquery.notice.css?m=1384281824,/framework/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css?m=1384281824,/framework/admin/thirdparty/chosen/chosen/chosen.css?m=1384281824,/framework/thirdparty/jstree/themes/apple/style.css?m=1384281824,/framework/css/TreeDropdownField.css?m=1384281824,/framework/admin/css/screen.css?m=1384281824,/framework/css/GridField.css?m=1384281824,/cms/css/screen.css?m=1383868747