I'm using D7 and installed the rubik theme. When setting the content schedule, i can't view the options and it seems to be missing. Its clearly there with firebug, just hidden with css display property.

After switching back to the seven theme i can see the settings. I suspect it has something to do with the collapse jquery function.

Is there something that needs to be done to see it with the rubik theme?

Members fund testing for the Drupal project. Drupal Association Learn more


Eric Schaefer’s picture

The same thing happend with the seven theme. We are currently waiting for http://drupal.org/node/1015798 to be resolved and backported to D7.

jonathan1055’s picture

Hi Verve8media,

We could not wait for #1015798: Fieldsets inside vertical tabs have no title and can't be collapsed so we added our own css file to fix this temporarily in #1035398: Vertical tabs in node type form are wrong. As you have rubik theme installed, would you like to try modifying the scheduler.css file to make it work for you? Then there might be a more general solution we could incorporate.


Anonymous’s picture

I'm also having this issue with Rubik... It appears that CSS is hiding legends inside field sets. For most forms this isn't a problem because the form API applies labels to form elements. However, radio buttons and checkboxes are given legends. See http://drupal.org/node/558928

Anonymous’s picture

This can be fixed if you switch your form to use the checkboxes element instead of a series of single checkbox elements. Individual checkbox elements render their titles as legends (which are then hidden by the current CSS). However, a checkboxes element will display a title as a label. If you switch to using checkboxes in scheduler_form_node_type_form_alter(), then that form will show up in the vertical tabs of the Rubik theme.

Anonymous’s picture

Well... I see that would be a challenge since you are leveraging the fact that the form sets variables by element id.

Anonymous’s picture

Ok, my assessment in #4 isn't exactly accurate. The problem is the field set has a legend, which is hidden, and because the checkboxes aren't wrapped in a element that displays a title, the collapsed group is hidden beneath an invisible title. With CSS it's possible to display the hidden legends, but it looks a bit ugly.

Anonymous’s picture

According to the issue linked above (#1015798: Fieldsets inside vertical tabs have no title and can't be collapsed) it's bad practice to collapse the fieldsets within vertical tabs. Is there a reason the publish and unpublish fieldsets are collapsed by default?

Anonymous’s picture

Neither the core patch in #1015798 or the scheduler 1.x-dev (the commited patch in #1035398) resolve the issue in Rubik. Apparently the CSS isn't specific enough. I've attached a patch that fixes the CSS for Rubik as well as seven.

alduya’s picture

The patch in #8 solves the problem for me with Rubik and Seven.

jonathan1055’s picture

Status: Active » Needs work
119.81 KB

Yes, I've not used Rubik before but just checked and adding vertical-tabs-pane(s) qualifiers does improve things so that now you can actually see the fieldset legend. But with Rubik I think there is some more work to be done, because when the fieldset is opened the legend overlaps the conent. See screen shot attached.

If it worked fine for you, then maybe you have modified your own rubik css and set some margin/padding so that it works. My test was on Firefox 3.6 on mac, so it could be a browser thing. Could you post a screen shot too?


alduya’s picture

There is indeed stil a problem in Firefox. Chrome and Safari display the fields correct. (also on mac)

zilverdistel’s picture

Subscribing, the patch in #8 seems to work.

jonathan1055’s picture

Here is an updated patch which fixes the Rubik theme on Firefox. I had to use a slightly new tactic because this particular theme could not be fixed with general css which did not mess up other themes. So what the code now does is add the theme name as an extra class to the top-level div. This gives the ability to fix certain themes without affecting other themes, by starting the css with div.vertical-tabs.rubik for example. I;m particularly pleased with this (he said modestly) as I used a couple of lines of jquery to add the required class. ie

  var theme = Drupal.settings.ajaxPageState['theme'];

So now, we can fix each default theme correctly, independently, and also add any fixes to other theme problems as they are reported.


jonathan1055’s picture

Status: Needs work » Needs review
3.07 KB

I'd forgotten to include the jquery in the patch.

jonathan1055’s picture

Added more detail to title, to assist those searching for this fix.
The latest code works correctly in Firefox, Safari and Opera (all on Mac).

Jackinloadup’s picture

Title: Rubik Theme and Missing settings » Rubik Theme and missing settings in collapsible fieldsets

#14 resolved the issue for me (chrome dev mac)

dtarc’s picture

I think this issue is actually a Tao issue. Tao is Rubik's base theme and the theming bug really should be fixed there: #1212314: Fieldgroup legend tags within vertical tabs panes are hidden.

This is actually an issue in core: #1015798: Fieldsets inside vertical tabs have no title and can't be collapsed

jonathan1055’s picture

Title: Contrib solution for non-collapsible fieldsets and missing titles » Rubik Theme and missing settings in collapsible fieldsets

Thanks. Yes we know, issue 1015798 has already been linked twice three times before in this thread ;-)

All of these css issues can be fixed in the base theme or in core, but we could not wait for those to be implemented so I devised a way that scheduler users could continue to use our D7 version in the meantime.

Thanks for you input.


jonathan1055’s picture

Title: Rubik Theme and missing settings in collapsible fieldsets » Contrib solution for non-collapsible fieldsets and missing titles
531 bytes
1.94 KB

For anyone wishing to use this in their modules, here are the two files which make up the solution. This is easier for you than trying to pick out the changes from the patches above. The css file can be extended to solve the problem for other themes not covered yet, and because it uses the theme name in the selector you can be confident that you won't mess up another theme by accident.

You will also nee to add something like this in the .module file:

function scheduler_form_node_type_form_alter(&$form, $form_state) {

  // Add the module css file
  drupal_add_css(drupal_get_path('module', 'scheduler') .'/scheduler.css');

  // Define the node settings and include the jquery file.
  $form['scheduler'] = array(
    '#type' => 'fieldset',
    '#title' => t('Scheduler settings'),
    '#weight' => 35,
    '#group' => 'additional_settings',
    '#attached' => array(
      'js' => array(
        'vertical-tabs' => drupal_get_path('module', 'scheduler') . "/scheduler_vertical_tabs.js"

This was just how I did it, I'm sure there are other ways to add the jquery file, if the above is not suitable.


jonathan1055’s picture

Title: Rubik Theme and missing settings in collapsible fieldsets » Contrib solution for non-collapsible fieldsets and missing titles

Core issue #1015798: Fieldsets inside vertical tabs have no title and can't be collapsed has just been committed to D7 dev. May need to check that it does not conflict with our solution.

kiseleva.t’s picture

In drupal 7.14 the error is not fixed. I've attached patch, which you can apply not only from module directory.

jonathan1055’s picture

245.21 KB

The actual contents of the patch you have given in #21 seem to be indentical to mine in #14. The only difference is the way it's been generated - see image. Is that what you meant?


scheduler patch 14 vs 21

wbobeirne’s picture

Priority: Normal » Major
2.83 KB

#21, patches need to target the module within the folder. Assumptions cannot be made about someone's folder structure (i.e. the scheduler module could be in someones profile/my_profile/modules/scheduler folder, etc.)

Also, the Rubik specific rules looked kind of wonky, so I've just removed them. Attached is said patch.

Before: http://cl.ly/image/2y0G0h0j3A0u
After: http://cl.ly/image/3s0T1J3X383j

I'm upping this issue to 'major', as it renders this module unusable for many themes.

#20, 7.15 fixes this issue, but the patch does not seem to conflict with it in any way, so I think it should still be committed for those who're still on older versions.

EDIT: Scratch that, it's functional but still lacks the fieldset titles: http://cl.ly/image/1U0e0u3T1100

jarune’s picture

Removed whitespaces.
Patch seems to work.

Tezza’s picture

I applied the patch in #23 and it works beautifully for:

Drupal 7.17
Tao 7.x-3.0-beta4
Rubik 7.x-4.0-beta8

Thanks to all.

jonathan1055’s picture

Priority: Major » Normal
Status: Needs review » Reviewed & tested by the community

D7 core has been improved, so this is no longer 'critical' but this patch is still required for Tao and Rubik themes.
The patch in #24 is fine, so I have marked it RTBC.

rickmanelius’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everyone for your patience and diligence. This is committed.

We may have to roll this back in the future if further enhancements to D7 fix this in core. However, we will address this here for now.

jonathan1055’s picture

I've checked this and it works as expected. Thanks Rick.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pfrenssen’s picture

Component: User interface » Code
Issue summary: View changes

This might not be needed in Drupal 8 any more. I created a followup to investigate this: #2468819: Remove theming workarounds and delete scheduler.css.

pfrenssen’s picture

Component: Code » User Interface