I have a bunch of embeded collapsible blocks within a main block, and then within each of those blocks is a table that I create using a theme function. Here is the themeing function that creates the tables (I have removed all of the ugly details to make it easier to read).
function theme_school_course_form($form) {
$output = '';
$header = array(...//the needed headers here);
foreach (element_children($form['sections']) as $key) {
$rows = array();
foreach(element_children($form['sections'][$key]) as $key2) {
$row = array();
$row['data'][] = drupal_render($form['sections'][$key][$key2]['cat1']);
$row['data'][] = drupal_render($form['sections'][$key][$key2]['title']);
$rows[] = $row;
}
$form['sections'][$key]['table'] = array(
'#type' => 'markup',
'#value' =>theme('table', $header, $rows)
);
}
$output.= drupal_render($form);
return $output;
}
This creates the tables inside the dropdowns and it looks great in the browsers as mentioned. However, in IE7 the tables do not show up when you expand collapsed fieldsets. If you look at the source, all of the source is there for the tables and all of the information is there, but expanding them doesn't do anything (it is just an empty fieldset). This is assuming the fieldsets are collapsed to start. However, if the fieldsets are not collapsed as default, then the tables show up fine and I can collapse and uncollapse them fine and everything works great.
In review, there is an error with the rendering of tables that are themed into collapsibled fieldsets that are defautled as collapsed in IE7. In IE6 and Firefox, they work fine.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI have noticed the same behavior.
The weird thing is that everything works fine in IE 7.0.5730.11 but the table is not shown in IE 7.0.5730.13
Obviously something has changed between these two versions of IE 7.
If we could figure out what triggers the issue in IE, we might be able to find a workaround.
Comment #2
drummThis is probably an issue with all versions of Drupal.
Comment #3
gunzip CreditAttribution: gunzip commentedsubscribe
Comment #4
Tim Cullen CreditAttribution: Tim Cullen commentedAs the original poster noted, if the fieldset is expanded by default, the toggle mechanism works. I've used this as a workaround:
Comment #5
rkdesantos CreditAttribution: rkdesantos commentedThis problem is plaguing some of my users. We have a Drupal v5.14 setup. Any patch or workaround until this bug can big fixed would be appreciated as it renders the ability to post to Drupal for IE7 impossible if any default settings in a non-working fieldset require changes.
(The suggested workaround in #4 is impractical as it would, as I understand it, require patching every module that creates a collapsed fieldset. If there is a way to fix this by changing only one or two files I don't get that from the the post.)
Comment #7
jdipper CreditAttribution: jdipper commentedIt looks like IE7 is somewhat going backwards...
In the system.css there are a few specific lines for IE6 (using * html):
/* Note: IE-only fix due to '* html' (breaks Konqueror otherwise). */
*html.js fieldset.collapsed legend,
*html.js fieldset.collapsed legend *,
*html.js fieldset.collapsed table * {
display: inline;
}
The symptom here is that tables aren't being displayed when coming from collapsed to open. Adding this fixes it:
html.js fieldset.collapsed table * {
display: inline;
}
Of course, the system.css states that this will break Konqueror, and core doesn't have an IE7 style sheet (although themes do), so I am unsure of where it could go.
Hopefully this will help people who are in need of a quick fix and also help to find a permanent solution! :-)
Jack
Comment #8
rkdesantos CreditAttribution: rkdesantos commentedThanks, jdipper. I tried this on v5.15 but it did not seem to have any effect. Logging in on my system as one of the users the collapsed fieldsets were still collapsed and could not be opened.
Comment #9
jdipper CreditAttribution: jdipper commentedYeah, should have said that I was using 6.9 :-\
I do think, however, that it's a related issue; seems IE's having issues with assigning styles when classes are assigned by JS (although I have no idea why it's only affecting tables).
Do you have access to IE6 and see if it works on that? If it does, it might be worth finding out if any *html entries can be used (as IE7 doesn't use them, you'll have to unstar them to test it out).
Failing that I'll take a peak this weekend to see if I can spot why IE7 isn't playing ball with D5.
Jack
Comment #10
rkdesantos CreditAttribution: rkdesantos commentedI don't have access to IE6 but I have IE7. I tried it with IE7 and unstarred the entries. Fieldsets still collapsed.
Comment #11
misty3 CreditAttribution: misty3 commentedsubscribed
Comment #12
Dave ReidComment #13
deviantintegral CreditAttribution: deviantintegral commentedSubscribing. This affects my Term Permissions module. The suggested hack in #4 works fine for me, though obviously isn't a long-term solution.
Comment #14
Frank Steiner CreditAttribution: Frank Steiner commentedSolution from #7 works fine at our site for IE7 and Drupal 6.9.
Comment #15
Jztinfinity CreditAttribution: Jztinfinity commentedThis could be the issue: http://cssbeauty.com/skillshare/discussion/1515/fieldset-woe-in-safari-ie7/ , a drupalized way to solve that would be in fieldsets with tables, use #prefix => div for the first element, #suffix => div for the last element, or to do things more properly, tweak the redering process.
Comment #16
sun.core CreditAttribution: sun.core commentedWhatever IE is... it's definitely not a cause for us to treat this as critical.
Comment #17
rkdesantos CreditAttribution: rkdesantos commentedThis is a usability issue not just an IE issue. If users cannot access the features of Drupal that seems to me to be fairly important.
Comment #18
rkdesantos CreditAttribution: rkdesantos commentedThis is a usability issue not just an IE issue. If users cannot access the features of Drupal and post that seems to me to be fairly important.
Comment #19
916Designs CreditAttribution: 916Designs commentedNote to future cross browser battlers:
Fusion sub theme, ubercart checkout page, Terms of Service Ubercart Module, IE7, Internet Explorer 7 CSS Problems.
To cure the inline table on payment details, I had to resort to:
I gave up on a scrolling terms of service node. The node is embedded, and fusion has too much (in this case) style hooked up to the 3 or so containing divs:
But at least it aint IE6 anymore!
Comment #20
djac CreditAttribution: djac commentedSubscribe
Comment #21
Lucasljj CreditAttribution: Lucasljj as a volunteer commentedDrupal 7 require Internet Explorer 8.x and later, see https://www.drupal.org/node/61509 :)
Comment #22
Lucasljj CreditAttribution: Lucasljj as a volunteer commentedComment #23
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedThat page was misleading (and looks like it since has been fixed). We haven't officially dropped support for IE7 in Drupal 7. Certainly these issues are very low priority now, but if someone wants to fix them and can do it in a way that doesn't hurt other browsers, it's still possible to do so.