Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#7 | theme-error after patch..JPG | 70.2 KB | jippie1948 |
#5 | remove_url_based_classes.patch | 1.83 KB | Pete Harlan |
Comments
Comment #1
NancyDruThis is the only thing keeping me from telling others that this is a perfect theme.
Comment #2
NancyDruBTW, this does not happen in Newsflash, which you claim you based this theme upon.
Comment #3
dclaeson CreditAttribution: dclaeson commentedI 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.
Comment #4
NancyDruInteresting. I didn't try that. But switching to Newflash resolved it for me.
Comment #5
Pete Harlan CreditAttribution: Pete Harlan commentedThis 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.
Comment #6
jippie1948 CreditAttribution: jippie1948 commentedHi,
I tried this one. However, the main body background disappeared, showing the side background.
JanPieter.
Comment #7
jippie1948 CreditAttribution: jippie1948 commentedscreenshot attached
Comment #8
Pete Harlan CreditAttribution: Pete Harlan commentedIt looks like something interfered with the html that says (after the patch):
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.
Comment #9
jippie1948 CreditAttribution: jippie1948 commentedDear Pete
Indeed, there was a mistake in the patched file after the patch. It works fine now.
Thanks,
JanPieter.
Comment #10
Pete Harlan CreditAttribution: Pete Harlan commentedI'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".
Comment #11
Corey Smith CreditAttribution: Corey Smith commented