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

[SOLVED?] SS3.0.0 CMS Ajax Issues

Go to End

8 Posts   2222 Views


Community Member, 541 Posts

1 July 2012 at 11:37pm

Edited: 01/07/2012 11:38pm

Hey all,

Don't know if I am the only one getting this, but I have been upgrading some of my 2.4.x projects to 3.0.0 and under "Pages" in the CMS, whenever I click a link, the little loading bar appears, but then nothing loads :-(.

What is stranger is that the URL changes, and if I refresh the page the correct form loads, but I have to do this after every time I click a link!

My current setup is:

Project: git project
-- framework: git submodule (sapphire)
-- cms: git submodule (silverstripe-cms)
-- mysite
-- themes
---- mytheme
-- .htaccess

Server is apache 2.2 with PHP 5.3

Really causing me to scratch my head! I have tried installing a new version from the website and that works, but I am getting the same problem across 3 sites I am upgrading.

Any thoughts? Cheers in advance :-)



Community Member, 541 Posts

2 July 2012 at 5:44am

So I got this kind of working now.

I ended up trying on one of the smaller sites (without much content) that I am upgrading, deleting all the local files and then re-checking out everything.

I also created a new database, but I a not convinced this was the issue.

For some reason this seems to have fixed the problem. I can only assume that maybe something from the previous version of SS may have been cached and was conflicting, but that seems quite odd, and I also tried ?flush=all as well which doesn't help.

I guess if any one else gets this issue upgrading, try:

1. Backing up your install.
2. Deleting your cache.
3. Deleting all local files (including cache).
4. Re-install from scratch and run /dev/build/?flush=all

5. (optional) pray to a higher power! :-)



Community Member, 8 Posts

4 July 2012 at 9:07am

I'm still having this issue. I've tried re-installing etc. I don't have the CMS module installed, just the framework, and I have two very simple model admins defined. So I have 3 tabs (including Security) and I can't switch between any of them.

The JS error (from firebug) is:

Could not convert JavaScript argument arg 0 [nsIDOMDocumentFragment.appendChild]
Line 6497

Help!!! Anyone!!!


James Bolitho

Community Member, 33 Posts

17 July 2012 at 11:11pm


I seem to be having this issue also. From testing it seems to happen when a form field returns a validation error in the admin area of the CMS, so for example if the passwords don't match on 'ConfirmedPasswordField'.

This seems to be the case in the Security section and a custom Model Admin interface I have created.

Not sure how to fix this at the moment so if anyone has an idea that would be gratefully received.




Community Member, 26 Posts

19 July 2012 at 12:42am

I had something similar happening when working on a GridField Component, the loading animation would show up, the URL changes, files/url request would be loaded but nothing would change on the CMS interface.
Chrome would just not show any error, it worked fine in Firefox and IE showed a cryptic error.

It came down to some JS requirement files not loading in the right order. Removing some requirements confirmed it and then delaying the necessary scripts solved the problem.

Hope this helps.


Community Member, 5 Posts

17 August 2012 at 4:28am

I'm having the same issue. Is there any way the cms wont load via ajax? I have other problems because of this, creating hooks for javascript for example. I want the pages to load normally.


Community Member, 2 Posts

31 August 2012 at 8:36pm

I had a similar issue. I solved it.

CMS content would not load via AJAX. Content would load fine via a normal request (so, just hit F5 in a decent browser, or correct the URL in IE).

I checked php error logs, Javascript consoles, and set my site into dev mode: Director::set_environment_type('dev'); Nothing produced any errors.

My problem was a _config.php outputting a newline.
Specifically I had a blank line at the start of mysite/_config.php, before the opening php tag.

{blank line}
// ...

The response from the server included a blank first line, and then the JSON response, but the JSON response was missing the last character.

{blank line}

--- Wild speculation ---
Perhaps the Content-Length is somehow calculated excluding the newline, so when a newline character is included, the content is bigger than what is reflected in Content-Length. That would potentially cause problems in various servers, proxies, and browsers.

I don't think the SilverStripe CMS code should silently handle errors in AJAX responses, especially in dev mode.


Community Member, 4 Posts

12 January 2015 at 4:54pm

I encountered the same issue. In my case the cause was that some of the files in my submodule project didn't have newlines at the end of them. This is evidently a necessity.