Jump to:

23459 Posts in 18906 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » [SOLVED?] SS3.0.0 CMS Ajax Issues

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
Go to End
Author Topic: 937 Views
  • Mo
    Avatar
    Community Member
    508 Posts

    [SOLVED?] SS3.0.0 CMS Ajax Issues Link to this post

    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

    Mo

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: [SOLVED?] SS3.0.0 CMS Ajax Issues Link to this post

    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!

    Mo

  • theorytank
    Avatar
    Community Member
    8 Posts

    Re: [SOLVED?] SS3.0.0 CMS Ajax Issues Link to this post

    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]
    http://domain.com/framework/thirdparty/jquery/jquery.js?m=1339536555
    Line 6497

    Help!!! Anyone!!!

    Josh.

  • James Bolitho
    Avatar
    Community Member
    33 Posts

    Re: [SOLVED?] SS3.0.0 CMS Ajax Issues Link to this post

    Hi,

    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.

    Thanks,

    James

  • thi3r
    Avatar
    Community Member
    25 Posts

    Re: [SOLVED?] SS3.0.0 CMS Ajax Issues Link to this post

    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.

  • hallecsyz
    Avatar
    Community Member
    5 Posts

    Re: [SOLVED?] SS3.0.0 CMS Ajax Issues Link to this post

    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.

  • paradigmincarnate
    Avatar
    Community Member
    2 Posts

    Re: [SOLVED?] SS3.0.0 CMS Ajax Issues Link to this post

    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.
    mysite/_config.php:

    {blank line}
    <?php
    // ...

    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}
    {"Content":"..."

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

    937 Views
Page: 1
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.