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.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

2.4.1 Admin Perpetual Hang?


Go to End


8 Posts   2267 Views

Avatar
S0crates9

27 Posts

1 August 2010 at 5:10pm

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?

Avatar
pianodavid

Community Member, 4 Posts

21 September 2011 at 8:43am

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

Avatar
Ryan M.

Community Member, 309 Posts

21 September 2011 at 11:09am

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

Avatar
pianodavid

Community Member, 4 Posts

22 September 2011 at 4:16am

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?

Avatar
Ryan M.

Community Member, 309 Posts

22 September 2011 at 10:40am

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.

Avatar
pianodavid

Community Member, 4 Posts

22 September 2011 at 12:02pm

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.

Avatar
pianodavid

Community Member, 4 Posts

24 September 2011 at 2:58am

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.

Avatar
Lucas

Community Member, 10 Posts

29 May 2012 at 8:38am

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.