Whist upgrading one of my sites from D6 to D7, I noticed the main content area (#wrap_center) was not sizing properly.
The CSS was being applied as though both sidebars were active. A bit of testing revealed that the class ".both_sides" was being applied to the body element, regardless of whether the left, right, or no sidebars were used.
I eventually traced the problem to where the body element is printed in the html.tpl.php template. Although the get_sidebar_state() function seems to work correctly elsewhere, in html.tpl.php $page['sidebar_first'] always evaluates to true (the same goes for 'sidebar_last' and 'right_dark').

I have attached a patch file which fixes this error.
The patch removes the extra classes from the body element in the html.tpl.php file and adds the admire_grunge_preprocess_html() function to the template.php.
The preprocess function adds the 'mainbody' and the correct sidebar state class to the classes_array variable to be expanded when the body is rendered.

I hope this is useful to somebody. Although there doesn't seem to be much activity around this project.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alancsilver’s picture

Thanks. That was very helpful....

Rustyjedi’s picture

Greetings :)

How I apply this pathc? Some advice to the beginner please? :)

Rusty

Rijidij’s picture

You can find the official documentation on applying patches here

As this is not an "official" patch, I would suggest you install it locally, i.e. follow the instructions beginning with the line:

If the patch was not made relative to the project's root directory...

There are also directions for reversing the patch.
But if it all goes horribly wrong, you can just delete and re-install the theme.

HTH

Goliathsbane’s picture

Issue summary: View changes
FileSize
1.01 KB
4.08 KB

This worked for me, though I just made the amends to the files directly (after a backup).

Files included - just rename the .txt to .php

kenorb’s picture

Status: Active » Needs review