javascript not loading: no registration?

I recently lauched a pretest of our Elgg site, but when internet is slow or there are some issues with connectivity the background loading of the javascript of the registraion page is often not loaded.

see here: http://www.uwasnet.org/Elgg/register

That leaves the user with a seemingly working registration page, but clicking "register" it doesn't work.

This is a really serious issue for us which I would like to avoid happening even if it means a lot slower page loaded. Is there some way to force loading of the javascript?

  • could having the cache on have any effect on this (I turned it off just now to test)?

  • Not really. What about third party plugins? Do you have any installed?

    Rodolfo Hernandez

    Arvixe/Elgg Community Liaison

  • yes, cache doesn't really seem to make a difference. I have plenty of 3rd party plugins installed, for the registration page the text captcha and the profile manager are probably the most relevant.

    The issue is however not that it doesn't work in general (on a fast connection it is fine) but rather that the loading of the javascript (I think) that happens in the background after the normal HTLM loading has finished seems to often "time-out" on bad connections thus leaving the user unable to register with no clear sign why (very frustrating).

    (the (i) context info popups also don't work then)

  • Might be worth updating your site from Elgg 1.8.14 to Elgg 1.8.16. Elgg 1.8.14 fixed a caching issue that was open since Elgg 1.8.0 was released. The side-effect of this fix was that some plugins that did not initiate their JS libraries in the correct way started to make problems. In the worst case these plugins stopped working. The preferred way would be that plugin developers would update their plugins to correctly initiate the JS libraries used. But as this might not happen (or at least not immediately) Elgg 1.8.15 brought a work-around for this issue.

    So, you might try Elgg 1.8.16 to see if this improves performance. The slowness might be due to a plugin that fails to load its JS libraries and you might not have noticed that this plugin is not working at all beside that it slows down everything.

    Of course, the slowness might be due to other reasons. Is it only the registration page or is the site slow in general. In the latter case it might be due to the server configuration (shared server?) and changing anything in Elgg itself (or the plugins) would not make the site load faster.

  • Well, I attributed the slowness to the server being in the USA and Internet connectivity behing horribly slow in most of Uganda (especially when it rains, as it is all wireless).

    I thougth about updating already, but 1.8.14 is what Hostgator supplies, and I am not sure if I want to mess with their "quick-install" system by manually exchanging files. Good to know that this is what might be causing it though.

    I was actually hoping there would be a setting/code snipplet I could add to the registration page so that the browser makes sure all the background javascript is loaded imediatly or something like that...or maybe block entry into the text fields until the page is really fully loaded.

  • If the javascript code fails to load the page would not get displayed at all if you wait with displaying it until everything has loaded. You could disable 3rd party plugins at least temporarily to test if the registration page works again without issues then. Maybe you can narrow down the problem to a single plugin and then it might be possible to fix the issue within this plugin to work also on Elgg 1.8.14 (in case it's really a problem of library initiation and not a slowness caused by a bad Internet connection).

    Using some automatic installer might seem easier, but installing / updating Elgg manually is not that difficult. On the one hand you might say "you don't want to mess up their install system". On the other hand the same install system might also mess up your site if an upgrade goes wrong. So, it does not seem a bad idea to learn how to maintain an Elgg site on your own independently of some installer mechanism.

  • Hmm, ok I don't know the technical details to be honest, but something is still loaded in the background "after" the browser has declared to have finished loading the site. I though that was some sort of javascript function, but that was just a guess.

    It is this later loaded part that causes the problems on bad connections, and it is not entirely evident to the regular user if that part has successfully loaded or not.

  • What happens when you disable 3rd party plugins? Is this "something" still loaded? You need to find out what this "something" is. Disabling 3rd party plugins temporarily is the easiest way to find out if they are causing the issue or not.

  • I am quite sure it is the additions to the profile manager makes to the registration page, but I don't think this is relevant to the problem at all. This is something that happens on the entire Elgg site, for example the drop down of the "login" button at the index page has the same behaviour that it loads in the background and often fails when you have a very bad connection. However in that case it will still link you to the log-in page so functionalty is only mildly effected, while on the registration page it is a serious issue.

  • Edit: I just checked if disabling all the the profile manager and the text captcha plugin would help, but the strange behaviour is persisting... well actually now it is gone again as the connection seems to have improved, but this morning registration was not possible due to this "bug" :(