JavaScript (or JsQuery?) is not working in 1.7

Hi all,

I am currently in the process of upgrading to 1.7.  Much of it seems to be working, still some little bugs to go through.  But the big problem is that JavaScript (or maybe it's just JsQuery?) isn't working at all on the site.

Some examples of things that are not working:

  • The Tools popup menu does not appear
  • The Message and Error boxes do not disappear
  • Spotlight will not expand (well, retract, since it's open)
  • Wigdets on the Dashboard do not initialize (the graphic just keeps spinning)

What have I done?  You ask...

Upgraded from 1.6.1 to 1.7.  Disabled all plugins, upgrade.php re-enabled them, fixed the deprecated functions in my plugins.  JavaScript never worked throughout that whole process.

The rest of the site is basically functional (although not perfect, groups are still not listed, and there are some missing views that I want to fix), so I am at a lost.  Everything work with 1.6.1...

Thanks for any help :)

-I_Aritst

  • @Vafello - it is just a static file - everyone has the same file and it works for them. I don't think it is a jQuery problem

  • @I_Artist, if jquery-ui-1.7.2.custom.min.js is not listed, something is wrong with your install. Maybe you should copy the files again.

  • We've established that Vafello's issue is with a plugin.

  • @vafello, thank you for letting me know that I am not alone :D

    @cash, I did the test, the box did in fact appear.  This is not a fresh install, 1.7 was installed over 1.6.1.  However the problem is there with all plugins disabled.

    I recopied the files from the Elgg-1.7 folder to the root of my site in the Eclipse PHP Explorer. Didn't work.

    I recopied the files from the Elgg-1.7 folder to the root of my site using the Linux file explorer. Didn't work.

    Can you please tell me what the exact problem was with @Vafello's installation? That might be a lead that will help me resolve this mystery.

    Also, where is jquery-ui-1.7.2.custom.min.js supposed to be called from?  Maybe that calling file is my problem...

    Thanks again for your help :)

     

     

    $("ul.topbardropdownmenu").elgg_topbardropdownmenu is not a function
    anonymous()statistics (line 51)
    anonymous()jquery-1....2.min.js (line 19)
    anonymous()jquery-1....2.min.js (line 12)
    anonymous()jquery-1....2.min.js (line 19)
    anonymous()jquery-1....2.min.js (line 19)
  • New information :

    I just looked in FireBug's DOM tab and I can see that JQuery is listed.

    I am getting 3 Errors on my page as reported by FireBug. 2 of the 3 errors are
    $("a[rel*=facebox]").facebox is not a function

    My page is indeed calling :
    <script type="text/javascript">

    jQuery(document).ready(function($) {
     $('a[rel*=facebox]').facebox()
    });
    </script>

    I looked on the live site (running 1.6.1) and facebox() is defined, whereas it is not in 1.7. Any ideas?

    If it helps you can see the staging site here : http://risesoftware.kicks-ass.net/reviews/

    Thanks!

    -I_Artist

  • Vafello's issue was that he was writing his own plugin and breaking something in that plugin. As soon as he disabled the plugin, everything worked.

    Your staging site has issues - the html page does not even finish because of a php error.

    No problems on my test site with the embed plugin (that uses the facebox lightbox).

    Some things to try:

    1. turning off all plugins and seeing if the jquery stuff works

    2. turn off the Elgg debug mode. I haven't tested it much but I suspect some bugs were introduced into Elgg 1.7 with it

    3. With both of the above done, turn on javascript errors and warnings in the Firebug console and see what is reported.

  • It's Working!!

    here are the latest results:

    I had already tried disabling all of the plugins, that did not work. I did not do that this time.

    I went to the Site settings, debug mode was OFF already. I thought it might help find the problem so I turned it on.  No error messages and no change in functionality. I went back and turned it off again and BOOM everything was working.

    I don't remember seeing that setting before, is it new feature?  I suspect I would have put it to ON within the staging site if it had been there previously...  I'm guessing it's defaulting to true (or maybe uninitialized?)

    Thank you VERY much for your help, there is no way I would have found this by myself.

    -I_Artist

    P.S. Sorry about the staging site, I forgot that it didn't work well when accessed from outside our network...

  • I know this thread's from a while back, but I was just having the exact same problem on a fresh install of Elgg 1.7.3 and thought I'd chip in with my findings.  It seems that the Simple Cache is to blame - going to Administration -> Site Administration and unticking "Use simple cache" (and then saving) fixes the problem.  If it's a production site and you don't want to disable this cache, you can re-enable it immediately thereafter and it will have been cleared - so you shouldn't see the problem described above any more.