User login

Drupal's collapsed fieldset labels disappeared in Firefox due to unclosed tag

If you have problems with collapsible fieldsets staying permanently collapsed because you cannot click on their titles (because the titles do not show), I frankly have no idea what the odds are that your problem is the same as mine.

But here is what my problem was:

My theme had an opening strong tag with no corresponding closing element (dynamically inserted into page.tpl.php from template.php to somewhat semantically style the site name). Firefox responded to this by throwing opening and closing strong tags all over the document, actually adding them to the HTML.

So, yeah, fixing the broken HTML fixed the broken javascript fieldsets. I didn't say it was an exciting story...

Resolution

Searched words: 
zen drupal collapsible not showing node edit collapsible javascript not expanding drupal collapsible form fields broken collapsed jquery doesn't expand drupal collapsed fields labels invisible cannot click on legend to uncollapse fieldset

Comments

Check your script files as well

Hi
Also had this problem with fieldsets not being expandable if they were collapsed to start with. I was theming a cck field using a field-field_name.tpl.php file. There were no form elements on the page so misc/collapse.js (drupal 5) was not getting added to the page by form.inc.
Fixed this with a
drupal_add_js('misc/collapse.js')
in the _phptemplate_variables function of the theme's template.php file.
hope this helps

additional javascript libraries

you can lose the collapsible frameset functionality by including additional javascript libraries.

I modified the zen template on drupal 6 to include scriptaculous and prototype, which in turn broke the collapsible framesets on the admin/edit pages. Some simple code to include these libraries only when needed fixed it for me.

I had also the same issue.

I had also the same issue. After a while I checked the JS libraries as recomemnded by Jason and it appears that it was Lightbox2 module that caused it. Disabling the module brought back the collapsible fieldsets.

So, many causes can lead to this issue.

I had the same problem!

I had the same problem! Thanks for the fix.

I am having the same

I am having the same problem. My collapsible menu stopped working after I did a bunch of things..but only for 'fourseasons' theme. When I change to all other themes, the collapsible menus work again.

Behaves the same in firefox and ie. I am not sure how to fix this.
Each page I can see has the collapse.js included.

(what is that ?S thing?)

This is using Drupal 6. I guess it might be something with what Jason said regarding javascript libraries. I have no idea how to hunt down the bug.

Administration Menu Dropdown

For me the bugger was 'Administration Menu Dropdown'.
When I disabled that I got back those lovely collapsible fieldsets. :)

same problem but only for new content creation page

very strange...i had the same problem like you in all pages.
Then i've disabled some modules and now all works fine except all create content pages (image, story, page, etc.)

...i cant understand...

Acquia Themes

I had the same issue (thanks to all of you for your helpful inputs) - I have an Acquia theme in my site and I figured out that seemingly one of the blocks in the postscript areas of my theme was the evildoer - so maybe have a look into this before disabling your modules.

Lightbox2

I had the same issue. It didn't seem to matter which theme I used. The culprit was Lightbox2 which seems to cause other issues. I disabled Lightbox2 and will upgrade to dev version

Thanks!

Mine was a malformed tag in a block. Would have probably yanked all my hair out trying to figure this one out, or at least it would have taken me forever, but your post led me straight to the source of the problem.

Much thanks,

Coyote

Collaped fieldsets problem

Hi - I had the same issue and it turned out to be some problem with jLightbox - disabling this fixed the issue though it does mean I cannot have floating windows anymore.

I had the same issue because

I had the same issue because I hadn't closed an italics tag in a field description that I had added, so I'd recommend checking any custom field descriptions containing HTML tags first.

Same problem, the culprit was

Same problem, the culprit was the Colorbox module (related to lightbox) , disabling it and the collapsible divs works fine again.

Thnx :)

Thanks all for solutions
That really saved me a lot of time :)))

Lightbox2 collapses fields on node edit form

Yes I am still running drupal 5.x and had the same experience when I tried to install Lightbox2. Thanks to this thread I found the problem and disabled the module.

Another thing to check ... the theme

Fieldsets weren't collapsing for me in my custom module, which uses the form api. But ... the collapse.js file was definitely being loaded (I could see it via Firebug).

Turned out that the theme was already importing the collapse.js file and my module was loading an additional copy. This was causing some kind of conflict. So, I stopped adding the library in my module and voila - collapsible fieldsets came back to life.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.