Jump to:

1160 Posts in 2632 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » 2.4.1 Admin Perpetual Hang?

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1122 Views
  • S0crates9
    Avatar
    27 Posts

    2.4.1 Admin Perpetual Hang? Link to this post

    I am experiencing a perpetual hang using Firefox, IE and Chrome. Once logged in and a click to a page is made, the progress cycle icon continues to load the page and never stops. When clicking onto another page icon, the warning for loss of data comes up. This has been happening from the upgrade from 2.3.X.

    Any ideas?

  • pianodavid
    Avatar
    Community Member
    4 Posts

    Re: 2.4.1 Admin Perpetual Hang? Link to this post

    Did you find a solution for this? I am experiencing exactly the same in a live 2.3.7 install. Tested in Firefox and Safari. I was hoping it would go away with an upgrade to 2.4. And it might... although currently another problem occurs. I will try to explain what is happening.

    I have copied that 2.3.7 installation locally and upgraded it to 2.4.5 which made this problem go away. However, when I upgrade the same site on the server the problem is even worse: When entering the admin section about 42 javascript files keeps loading over and over again (with ajax, so the web browser thinks the page is completely loaded), and the menu items in the site tree keeps getting more and more space between them, thus continuously expanding the page listing. In Safari this never stops, but in Firefox I think it does stop after maybe five or six iterations.

    Since the upgrade works locally but not remotely I was thinking it might be something with the server. It is the same PHP version (5.3.2). PHPUnit is 3.4 on the server and 3.5 locally, can that be the problem? Could it be a file permissions problem? Which directories and files needs Silverstripe be able to write? Write permissions are set on the assets and silverstripe-cache directories. By the way, the site is in two languages so Translatable is enabled.

    Any pointers to a solution for this?

    (By the way, nice work with this CMS guys!)

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: 2.4.1 Admin Perpetual Hang? Link to this post

    Install Firebug in Firefox if you don't have it already and see what kind of JS or HTTP errors are being outputted.

  • pianodavid
    Avatar
    Community Member
    4 Posts

    Re: 2.4.1 Admin Perpetual Hang? Link to this post

    Thanks for your reply. There are no errors in Firebug. I see that the HTML for the sitetree is building up loads of nested span-tags. Like this:

    <div id="sitetree_ul">
    <ul id="sitetree" class="tree ">
    <li id="record-0" class="Root nodelete last current children children children children children children children children children children children children children children children children children children children children children">
    <span class="a Root nodelete last current children children children children children children children children children children children children children children children children children children children children children">
    <span class="b">
    <span class="c">
    <span class="a Root nodelete last current children children children children children children children children children children children children children children children children children children children children">
    <span class="b">
    <span class="c">
    <span class="a Root nodelete last current children children children children children children children children children children children children children children children children children children children">
    <span class="b">
    ...


    Each child span with class "a" gets one less class "children". This nesting continues indefinitely. Something similar also happens for each menu item in the sitetree, e.g.

    <ul class="">
    <li id="record-1" class="NewsHolder closed">
    <span class="a NewsHolder spanClosed">
    <span class="b">
    <span class="c">
    <span class="a NewsHolder spanClosed">
    <span class="b">
    <span class="c">
    <span class="a NewsHolder spanClosed">
    <span class="b">


    Do you know what can cause this?

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: 2.4.1 Admin Perpetual Hang? Link to this post

    I'm not sure what could be causing it but let's troubleshoot by a process of elimination.

    You said the problem started appearing after an upgrade. Did you follow upgrade instructions exactly? Meaning, did you completely replace all the SilverStripe module folders (cms, sapphire, googlesitemaps, etc) or did you simply "merge" it with your existing?
    If you straight out replaced all of them and still got the problem, then the problem might lie in your custom code or any modules you have installed.
    I would remove them all then add them back one by one to pinpoint where the problem comes up.

  • pianodavid
    Avatar
    Community Member
    4 Posts

    Re: 2.4.1 Admin Perpetual Hang? Link to this post

    Yes, I completely replaced all Silverstripe folders. I have no other modules installed, only custom code for extending Page and Form. I don't think I can remove my page types, run dev/build and keep the content intact? But I think I found out why the HTML structure is continuously growing, at least I think it is closer to the actual problem. I will explain.

    I noticed in Firebug that the javascript sapphire/javascript/HtmlEditorField.js is loaded, which contains an ajax call to getimages() in admin/EditorToolbar/ImageForm. The Response headers for this call contains a header called "X-Include-JS" which has 41 comma separated URL:s to javascript files as its value. These files are then loaded and the last of these files is sapphire/javascript/HtmlEditorField.js, which makes another ajax call to admin/EditorToolbar/ImageForm::getimages() and round it goes. The ajax call is conditioned, so in this case apparently the following condition is always true:

    if($("#FolderImages").length > 0 && $("body.CMSMain").length > 0) loadImages(false);

    To clarify, the 2.3.7 installation has the "perpetual hang" issue which is that you log in and click on a page and the progress cycle icon never stops (I don't know when the problem started, it was not always like this). The 2.4.5 installation upgraded from said 2.3.7 installation behaves like I describe above with an infinite loop of loading javascripts.

    I will make a new copy of the 2.3.7 installation and upgrade it to see if the same problem occurs again. If it does, I'll remove any custom code and start from there as you suggested Ryan. Thanks for the tip.

  • pianodavid
    Avatar
    Community Member
    4 Posts

    Re: 2.4.1 Admin Perpetual Hang? Link to this post

    Solved! The solution for me was this: the server admin had at some point installed the Apache module mod_pagespeed which optimizes javascripts, HTML etc. Now that the module is turned off everything works fine.

    Just a note that might be related to similar problems: I read somewhere, in this forum i think, that combining javascript files in Silverstripe sometimes create problems in the CMS admin.

  • Lucas
    Avatar
    Community Member
    10 Posts

    Re: 2.4.1 Admin Perpetual Hang? Link to this post

    Just to confirm that I see this problem still with recent 2.4.x (I'm 3 commits behind 2.4.7 right now, and need to `git pull`).
    Disabling mod_pagespeed did indeed fix the problem.

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