As soon as I enable the jquery_update module I can't collapse fieldsets anymore. I can only collapse those fieldsets once, which were expanded by default when the page was loaded. But if I expand them afterwards, I can't collapse them again. Deactivating the jquery_update module makes all Drupal fieldsets work as expected again. I only experience these problems with Firefox 2.0.0.3, Konqueror works fine with activated jquery_update module.

Comments

jjeff’s picture

Are you using the latest version of the module? This problem should be addressed by the collapse-fix.js script.

Is this file in your module directory?
Can you find a reference to collapse-fix.js in the HTML source of your page?

If the answer to both of those is 'no', then you should be sure to get the latest version of the module.

Otherwise, it would be helpful to see the scripts section of the html head of your page. Please paste it here so we can take a look at the order in which the javascript files are being included on the page.

yojoe’s picture

The answer is 'yes' to both of those. Here's the corresponding part of the scripts section in my page:

<script type="text/javascript" src="/misc/jquery.js"></script>
<script type="text/javascript" src="/misc/drupal.js"></script>
<script type="text/javascript" src="/sites/all/modules/jquery_update/compat-1.0.js"></script>
<script type="text/javascript" src="/misc/collapse.js"></script>
<script type="text/javascript" src="/misc/textarea.js"></script>
<script type="text/javascript" src="/sites/all/modules/jquery_update/collapse-fix.js"></script>
jjeff’s picture

Crud. All of that looks like it's working just the way it's supposed to.

Some other questions for you:

- What platform are you on? Did you say Firefox? What version? For Windows?
- Are you running the latest Drupal (5.1)?
- Is your Drupal installation running locally or on a remote server?
- Assuming that it's running remotely, is the server especially slow? Do you have a complex installation and/or are your pages taking a while to render?
- Does the Firefox error console show (in the Tools menu) show any errors for a page with collapsing fieldsets?

We've had some talk about the method that we're using to fix the collapsing fieldsets and we wondered if there might be situations where our overrides could fire out of order and end up not working. I'm trying to figure out if this is happening in your install.

yojoe’s picture

Platform: openSUSE 10.2 (x86_64)
Drupal 5.1 running on my local machine (ThinkPad T60p), pages render very fast
Firefox: 2.0.0.3 (i586)

Just two CSS errors in my error console:
modules/system/defaults.css: line 43: display: inline-block;
all/modules/cck/content.css: line 10: filter:alpha(opacity=50);

yojoe’s picture

Hm, I just found out, that these problems only occur with the 'Garland' theme.

Seems like it's connected to the problems reported here:
http://drupal.org/node/133916
http://drupal.org/node/133917

So the question remains... is this a Garland bug, a jquery bug, a Firefox bug or a strange combination of all of them?

jjeff’s picture

So the JQuery Update module should work fine for any "properly written" (John Resig's words, not mine) Javascript that was written for Drupal 5. However, not all of the core code is quite as it should be. I would guess that Garland is doing something to modify the core textarea script. Actually upon further investigation, there doesn't seem to be any evidence of that.

I'm stumped.

Can anyone else confirm this issue?

dvessel’s picture

This is a known issue. http://drupal.org/node/120291

briantullydelete’s picture

Title: Can't collapse fieldsets anymore » collapsed fieldsets won't/can't be expanded

not sure if this is related to the previous bug about not being able to close fieldsets, but we're having the opposite issue. In other words, for fieldsets that are defined as collapsed by default, there is no way to open them. A good example would be within CCK where by default some fields are collapsed (default value, PHP code). After installing the jquery_update these fields are no longer editable because they cannot be expanded.

I also tried using the collapse.js patch but this doesn't help either. Seems directly related to the new jquery.js file contained in jquery_update. As soon as I reverted back to the original jquery.js the fields were collapsible/expandable again (and therefore editable).

Any ideas what the issue might be and is there a fix on the horizon?

Many thanks in advance,
brian

beginner’s picture

try disabling upload.module:
http://drupal.org/node/162743

apaderno’s picture

To disable upload.module doesn't work. The fieldsets will not collapse more than once, when jquery_update is enabled.
Disabling it makes all work back.

jrabeemer’s picture

Make sure you overwrite the jquery.js file in the /misc folder. The update module won't overwrite this file for you. Otherwise, you're still using the old jQuery.

apaderno’s picture

It's what I did, but fieldsets keep to not work. I also tried replacing the jquery.js file without to activate jquery_update.module, but after a while the fieldsets get the wrong behavior.

I noticed that jtools.modules adds its own version of collapse.js. Maybe it's that module to make the trouble.
Is there anybody who has this module installed and who tries to use jquery_update.module?

jrabeemer’s picture

I use the jTools calendar and drop down menu with jQuery Update. It works. You need to make sure you are using jQuery 1.1.2 in /misc not the new jQuery 1.1.3.1. This newest version doesn't work yet.

ximo’s picture

Not sure this will work for everybody, but it certainly made my fieldsets collapse!

Put this in the <header> of page.tpl.php:

  <script type="text/javascript">
    $(document).ready(function(){
      $(".collapsible").click(function(){Drupal.toggleFieldset(this);return false;});
    });
  </script>
ximo’s picture

Sorry, the above code will collapse the fieldsets as soon as you click on its contents.

Try this code instead:

  <script type="text/javascript">
    $(document).ready(function(){
      $("fieldset.collapsible > legend").click(function(){Drupal.toggleFieldset(this.parentNode);return false;});
    });
  </script>
SocialNicheGuru’s picture

Get rid of Nice_primary_menus - worked for me

Hello all,

ok so I have had this problem suddenly and I could do no development because I could not get the collapsed fields on views or any other page to open. I could see the source code and it was there, but the page would not let me access it.

I tried everything from installing to other things.

I finally went through my module directory and methodically de-activated the last modules that installed. Low and behold nice_primary_menus was the culprit for me.

I hope that helps someone else and saves you from spending FAR too much time trying to figure this out.

Chris
www.activelyOUT.com

sisyphe’s picture

Is this actually a memory/other limit problem (new module increases processing/memory needs, so uninstalling it can fix the problem)? I ran into the same issue, but in my case I'd made no recent configuration changes, and my parallel test system (which differed only in that it had fewer active unrelated modules) was still working. Increasing the memory in settings.php solved the problem (after none of the approaches suggested here did).

webchuck’s picture

Category: bug » support
Priority: Critical » Normal

Double check that you don't have multiple jquery.js calls in your header. My page was calling jquery.js 3 times for different modules and this was causing the collapsible fieldsets to not close.

Karel’s picture

I have exactly the same problem. Unfortunately, LightBox doesn't seem to work without jQuery update, and no JavaScript works after jQuery update.

Leeteq’s picture

Version: 5.x-0.8 » 5.x-1.0
Status: Active » Fixed

With Drupal 5.7, I have Lightbox2 - 5.x-2.3 and the JQuery update 5.x-1.0 working nicely together.
Collapsible fieldsets works in this environment.

It works with both the Chameleon theme (non-phpEngine) and the Garland theme.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nevets’s picture

Status: Closed (fixed) » Active

I think I figured out why some times people have the problem and other times not. In some cases collapse-fix.js is referenced before collapse.js in which case the fix is over written by the original code. Maybe it would make sense for jquery update to pull in collapse.js before collapse-fix.js.

apaderno’s picture

In my case, there aren't any multiple calls to jquery.js, but there are two files called collapse.js (one of them comes from jstools) which are called after collapse-fix.js.

Can that be the problem?

nevets’s picture

Yes both collapse-fix.js and collapse.js define the same function. Which ever one comes last "wins". The kludge fix is to take the function in collapse-fix.js and over write the same function in collapse.js (you only want to over write the one function, not the whole file)

apaderno’s picture

That didn't work for me on an installation with Drupal 5.8-dev.
I simply added the jquery.js from the module, without to activate it, and the fieldsets collapsed.

Does that simply mean that the 5.8-dev version already uses a recent version of jquery.js or it simply works because of jstools?

apaderno’s picture

Pardon. I meant that collapse.js is called before collapse-fix.js.
As it is called before collapse-fix.js it should not overwrite the functions it defines, and then the fix should work.

I don't really understand this, but maybe it happens just because I am using Drupal 5.8-dev, even if I don't really understand why this would happen.

apaderno’s picture

I was able to make the fieldset work.
I think the problem is how the installation steps are executed: as said by the author, the module must be first activated, and then the jquery.js can be copied from the module folder to the misc folder (it must be copied, and not moved, or the module would prompt you with an error message).

I hope this can help any other person who has the same issue I had.

charlie_’s picture

Title: collapsed fieldsets won't/can't be expanded » collapsed fieldsets won't/can't be collapsed
Version: 5.x-1.0 » 5.x-2.x-dev

I'm running into a similar problem in regards to jQuery Update 5.x.2 (jQuery-1.2.3).
But once a fieldset is expanded, it *cannot* be collapsed. Has anyone else run into
this? If so, is there a solution? Also, I was thinking that it might be even easier to
simply replace the current expand/collapse implementation with something else,
since I see there are so many apparent "nits" with it. I have a potential replacement.
But don't know how to *correctly* remove the current one. Can anyone assist me
in how to remove the calls, so I can use my different implementation, and create
a module out of it?

Thanks.

nevets’s picture

If I copy all the js files to misc for the dev version, do a refresh in the browser and fieldsets are work as expected for me.

charlie_’s picture

@nevets
Thank you for your response. Reading it made me give it another try. For some reason, it
all worked as it should. I cannot explain why it didn't work the 2 times I tried before this
time. I am *not* caching pages in either Drupal, or in my Browser. I always performed a
"Force reload" in the browser as well. But for some strange reason, the two *prior*
attempts failed. But *this* attempt worked!

Thank you again. :)

--Charlie

Anonymous’s picture

this has to be fixed. this was the easiest fix of them all.. are you guys sure you did the install right and your browser cache was cleared?

psynaptic’s picture

The problem seems no longer to be "fieldsets cannot be collapsed" but rather "on first expansion fieldsets don't animate, after that works as usual".

epicflux’s picture

Or maybe its just a matter of chance with how one unpacks the files, and/or turns the module on, and/or at what point the sun was in the sky.

I turned off jquery update module, unpacked files again, copied over jquery.js again, turned it back on, fixed...

apaderno’s picture

I had problems with the module every time I reinstalled it, and that was merely because I copied the files to the misc folder before to enable the module. Whenever I do like the author suggests to install it, I don't have any problems.

nathanraft’s picture

I am still having this problem. Have tried the restoring it all back and tried the directions in this issue as well as clearing both drupal cache and browser cache and it still doesn't work. It expands or collapses once and then on click to reverse it throws this js error in jquery.js.

E.easing[this.options.easing || (E.easing.swing ? "swing" : "linear")] is not a function

Have also noticed that it does not animate but just flys open. Any additional help is greatly appreciated!!

apaderno’s picture

I can just suggest to disable any third party modules (including jQuery Update), enable jQuery Update, and then enable all the others one by one; everytime you enable a module, you check if there are any issues with jQuery Update.

I am sure there is a problem with some installed modules, as the issue you are having is not reproducible. Or it's that, or it's a problem with the server.

-- Kiam@AVPnet

Anime Girl’s picture

Expandible field sets are completely broken on my site too. This is the same if I use FireFox, Safari or IE on Windows.

apaderno’s picture

Try copying the not minified file of jQuery 1.2.3 in both the misc folder, and in the folder containing jQuery Update.

If that doesn't work, write down any errors given by the JavaScript console.

-- Kiam@AVPnet

apaderno’s picture

Status: Active » Fixed

Do I get nobody has this issue anymore?

psynaptic’s picture

I've just done a clean install of DRUPAL-5-7 and jquery_update-5.x-2.x-dev and cleared my browser cache (Safari) and it works perfectly. Don't know what was gong on before, it may be some other module or just simply the cache hanging on to something.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

slavix’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

----------------
nevermind !! i found my problem and fixed it, so everything works now! thanks

Leeteq’s picture

Status: Active » Fixed

@slavix: if you found another solution than what has been described above, do you mind sharing it?
Anyway, it seems that this issue is fixed, no need to re-open it if you have fixed it, I suppose.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

suydam’s picture

Version: 5.x-2.x-dev » 5.x-2.0
Status: Closed (fixed) » Postponed (maintainer needs more info)

Is it possible this has re-surfaced with Drupal 5.10?

Here is what I did:
1) Upgraded Drupal to v5.10
2) Got an error message from jquery_update asking me to copy all the .js files to /misc (Because of course, Drupal 5.10 upgrade overwrote the js stuff in /misc)
3) Copied *.js from sites/all/modules/jquery_update to misc

Test results from IE7 and Firefox 3
Fieldsets that start collapsed will expand one time but never re-collapse (for example admin/build/modules)
Fieldsets that start expanded will collapse once, expand once but then you can never re-collapse them.

p.s. Yes, my browser cache is cleared. :)

apaderno’s picture

I would try by following these steps:

  • Uninstall jQuery Update;
  • copy the files from Drupal into the misc folder;
  • re-install the jQuery Update module, without to copy any files in the misc folder;
  • re-activate the module, and when it says there are problems because the files in the misc folder are not the ones it expects, copy the files into that folder.

I had the same problem once, and I did like I reported here; in my case it worked.

mjlF95’s picture

I had this problem recently and followed Kiam@avpnet.org's instructions which helped me out, though it was not the full story. What ended up happening is when I'd originally installed jQuery Update I saw the error message that said something to the effect of "you must overwrite the file "jquery.js" in the drupal/misc folder with the one from the jquery_update/misc folder". So, following the directions, that is what I did. Enter the collapse problem that others are having.

The solution. I read the installation instructions at http://drupal.org/project/jquery_update is "Copy all files from the subfolder 'misc' of this module and use them to replace the files at misc/.". So I tried disabling/reinstall/re-enable the module replacing the "new" jquery.js file with the "old" one from the drupal core files, and this time when I got the error I followed the instructions and copied all the files from misc to misc. Problem solved. Score 0 me for not reading the documentation, score 0 module writers for misleading info in the error message. Might want to be a little more specific next time.

dinesh kudtarkar’s picture

Thanx mjlF95.

That really helped me.

apaderno’s picture

Status: Postponed (maintainer needs more info) » Fixed

The problems with jQuery Update are caused by the order of the operations; you must first enable the module, and then copy the files from the misc folder of the module to the /misc folder.
All times I first copied those files before to enable the module, I got the issue described here.

Changing the status of the issue, as it seems it's now (again) fixed.

wilson98’s picture

Status: Fixed » Active

where's the file collapse-fix.js? i downloaded the latest release and 5.x-2.0-dev, and didn't find it in the package. The collapsed fieldsets issue happened to me. i'm using drupal5.12. and also find that admin_menu's fadein doesn't work under ie6.

wilson98’s picture

Status: Active » Fixed

i cleared the firefox cache, and reinstall the module, then it works fine.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

open-keywords’s picture

I add the trouble in case of a multisite site setup, with only one site having jquery_update being installed

solution here : http://drupal.org/node/324212