This is my problem: the collapsed fields suddenly refuse to "uncolapse", eg. they stay collapsed. The only change I did before this happened was to look at some language settings.

After lots of searching I found no solution to the problem.
What I think is happening that the legend tag of the collapsed fieldset is not turned into a link, wrapped in a tags.
This could only happen if Drupal.behaviors.collapse from misc/collapse.js (yet, collapse.js IS NOT missing from the page so this is not the problem) is not executed. I don't know why this could happedn without any apparent reason nor do I know the misterious ways drupal handles javascript, so please help!!

P.S. I also treied adding and enabling the jquery update module after the problem in case it could "fix" this, but no change

Comments

neuronq’s picture

OK... so this never happened to anyone else?
Can someone at least point me to a sane explanation of how javascript works in drupal to try and fix it myself?

bsenftner’s picture

I've found this:

http://drupal.org/node/121997

Which does help, but I'm, still having a similar problem as you: java script that should run, but is not.
I've described some things I've tried here:

http://drupal.org/node/529296

these solutions worked on a different site, different host. Perhaps they'll work for you.

I'd love to hear of any progress on your issue.

neuronq’s picture

OK... finally found that my problem was because Drupal.behaviors.l10nClient() was called before Drupal.behaviors.collapsible() and some other functions from Drupal.behaviors and somehow after it no other function was called (probably a bug in the Localization Client module or some weird jQuery bug... it was the same in all browsers). The problem manifested only after changing the default language FROM English to smth. else.

So I modified misc/drupal.js to call Drupal.behaviors.l10nClient() after all other Drupa.behaviors. Not a nice way to do it but right now it works for me and if anyone comes across the same thing here's a pacth (to Drupal core, not to the module ...yeah, I know, that's not the way to do it):

--- ./misc/drupal.old.js	2009-07-02 09:32:04.000000000 +0300
+++ ./misc/drupal.js	2009-07-26 16:55:17.766588500 +0300
@@ -38,9 +38,24 @@ Drupal.attachBehaviors = function(contex
   context = context || document;
   if (Drupal.jsEnabled) {
     // Execute all of them.
-    jQuery.each(Drupal.behaviors, function() {
-      this(context);
-    });
+    
+    
+    // PATCH - {
+      // jQuery.each(Drupal.behaviors, function() {
+      //   this(context);
+      // });
+    // } PATCH
+    
+    // PATCH + {
+      for (var f in Drupal.behaviors) {
+        if (f != 'l10nClient') Drupal.behaviors[f](context);
+      }
+      if ('l10nClient' in Drupal.behaviors) {
+        Drupal.behaviors.l10nClient(context);
+      }
+    // } PATCH
+    
+    
   }
 };
 
@@ -277,6 +292,7 @@ if (Drupal.jsEnabled) {
   });
 }
 
+
 /**
  * The default themes.
  */ 

...if I'm not too lazy I might submit a bug report to the developers of Localization Client.