User login

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

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

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

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.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Internal paths in single or double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or path. Paths to files in single or double quotes, written as "files:somefile.ext", for example, are replaced with the appropriate URL that can be used to download the file.
  • 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>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.

More information about formatting options

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