Closed (duplicate)
Project:
Drupal core
Version:
x.y.z
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Sep 2005 at 17:32 UTC
Updated:
18 Jan 2006 at 21:25 UTC
When you place something in the hook_onload, it causes collapsible form groups to not be collapsible.
Comments
Comment #1
Souvent22 commentedI had a div in which i changed the name of it's id, and that fixed the problem. pehraps there is some documentation somewhere about reserved words/ids that a used in the core js? Anyway, fixed. :). don't know if it's a bug or not really though.
Comment #2
darius commentedThis seems to be a bug. Any use of hook_onload stops collapse.js functions from being loaded. See also http://drupal.org/node/28700.
Darius
Comment #3
dblado commentedHi Darius,
Took me a while to track down this post :) :) was pulling my hair out becuase when I disabled my module, the collapsible forms came back :)
haha
I'm still seeing this issue and I don't have context links installed..I did a little test and commented out my onload hook and the collapsible forms work fine...
any ideas? even if I hardcode my onload into my theme, I get the same behavior!??!
Comment #4
m3avrck commentedThis isn't a bug with Drupal, but rather the module itself. It cannot explicity declare an onLoad() handler, otherwise it'll override the other ones on the pager (e.g., collapsible fieldsets).
To get around this, use the Drupal-specific function:
addLoadEvent()Comment #5
m3avrck commentedHmm, I might have mis read the first post, are you using hook_onload() to add an event? This shouldn't cause this behavior but I don't have time to look into this anymore at the moment.
Comment #6
dblado commentedI did change it to addLoadEvent in js and that worked...however, hook_onload should either be fixed or removed...
who is responsible for that?? We should try and get that done for the 4.7 release!
Comment #7
darius commentedThere is another thread that duplicated this issue: http://drupal.org/node/27884
I am closing this one then. It seems that hook_onload will be removed.
Darius