When I first display the monthly calendar (example.com/calendar) the columns are narrow (image: calendar_prob1.jpg) but if I go forward a month, then back, the calendar looks like it should (image: calendar_prob2.jpg).

See #659934: Month view narrow columns for more details and pictures.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NancyDru’s picture

This is the only thing keeping me from telling others that this is a perfect theme.

NancyDru’s picture

BTW, this does not happen in Newsflash, which you claim you based this theme upon.

dclaeson’s picture

I am also experiencing this problem with the Simply Modern theme.

The node name in the URL appears to be case sensitive.

Regardless of whether I specify the default path of "calendar" or "Calendar" when editing the view, the calendar will be too narrow if I use a lowercase URL (mysite.com/calendar or mysite.com/?q=calendar), but will be full width of the page if I capitalize the node name (mysite.com/Calendar or mysite.com/?q=Calendar). This behavior is both consistent and reproducible.

NancyDru’s picture

Interesting. I didn't try that. But switching to Newflash resolved it for me.

Pete Harlan’s picture

Status: Active » Needs review
FileSize
1.83 KB

This is because of the code starting on line 313 of page.tpl.php that defines $page_class as a concatenation of the page's arguments with "-" between them, and then on line 323 adds class="$page_class" to the inner-content div.

What's happening is that since the page is called "calendar" with no arguments, $page_class is set to "calendar", and that is the name of a class defined in date.css in the date module, which defines .calendar to have a width of 185px.

So as long as your calendar's URL isn't "/calendar", you're okay (unless your new URL matches some other class giving unwanted behavior).

This seems like a bad idea in the simply_modern theme. It's a time bomb waiting to go off any time you choose a simple URL that matches a CSS class defined somewhere, or defined in a module you enable in the future.

I'm attaching a patch that removes this feature (and a similar class computation that affects the "page" div); this solves this problem for me and doesn't appear to break anything. If anyone knows why this patch isn't a good idea please holler.

jippie1948’s picture

Hi,

I tried this one. However, the main body background disappeared, showing the side background.

JanPieter.

jippie1948’s picture

screenshot attached

Pete Harlan’s picture

I tried this one. However, the main body background disappeared, showing the side background.

It looks like something interfered with the html that says (after the patch):

  <div id="page"><div id="shadow-right"><div id="page-bg">

The CSS relies on those ids to be the way they are to assign a white background to the content area. The patch manipulates that line, so if something went wrong with the patch application it could cause the problem you're seeing.

jippie1948’s picture

Status: Needs review » Fixed

Dear Pete

Indeed, there was a mistake in the patched file after the patch. It works fine now.

Thanks,

JanPieter.

Pete Harlan’s picture

Status: Fixed » Reviewed & tested by the community

I'm glad this works for you now!

I saw that you changed the status to "fixed". Since the patch doesn't appear to be applied yet to a released version of the code, I'll set this issue's status instead to "reviewed & tested by the community".

Corey Smith’s picture

Status: Reviewed & tested by the community » Closed (won't fix)