Support » Plugins » [Plugin: The Events Calendar] clicking on calendar does not show me events

  • When I click on the calendar link it brings up the calendar with the current month selected (march 2010) however the events dont show.

    when i change the month via the drop down, then go back to the current moth, the events show…..
    any help is appreciated.


Viewing 15 replies - 1 through 15 (of 29 total)
  • I am having the same problem! But it just started to act like that.
    It was working for me yesterday… let me know if you figure something out

    Same here. I had added it to a site in-progress of development and just ran into this issue. Worked fine before, now I just get the blank calendar (actually it’s showing January by default it seems) even thought the selector is set to current month: March, 2010. Going to another month and back to March actually loads March with events displayed.

    So /category/events/month/ = defaults into jan w/selector of March (but it’s not)
    if you go to /category/events/2010-03/ = march, march does load, but the default addressing lands on /category/events/month/ from plugin’s ‘View All Events’ and “Calendar” links.


    I have no idea if this actually fixed it or it’s a very aloof bug in the plugin, but I just updated my settings > general > time-zone from the default of UTC+0 to my local time-zone: America/New York and now the default month (current month) loads the current month and current events properly (as it did before). This after not loading them properly about 20 time just before I updated this setting.

    You might try changing or even just re-saving your current time-zone/general settings and see if this fixed it for you.

    Best of luck! If anyone has a more solid solution and/or cause of the original issue I’d like to know.


    Sorry for blowing up the board! That was not a fix… just a false hope I guess. Same issue is still at work.

    my issue just arose today too…… was working yesterday, then just stopped?????

    same here…glad I’m not the only one

    Same, and also the same that it just started happening today I believe.

    I attempted what one of the above posters mentioned to no avail:

    I just updated my settings > general > time-zone from the default of UTC+0 to my local time-zone: America/New York and now the default month (current month) loads the current month and current events properly (as it did before).

    For now my solution will be to change the link code to the actual month, that will at least work for March until I would then have to change it again. Hope it’s just a simple bug.



    I am having the same problem!

    thank’s a lot for help us.

    ditto on this problem. Weird that it can pass the current month into the page to select the right item in the dropdown, but doesn’t carry through to actually showing the right month in the calendar. I just installed this today, so I’m glad to see this isn’t how it has always worked and is just a new bug. 🙂

    From what I can tell, the link is created by


    Example on the list.php page –

    <span class=”back”>
    {a href=”<?php echo events_get_gridview_link(); ?>”><?php _e(‘« Back to Events’, $spEvents->pluginDomain); ?}


    I found the event_get_gridview_link() within the the-events-calendar.php file

    it looks like this:

    function events_get_gridview_link( ) {
    global $spEvents;
    if( ” == get_option(‘permalink_structure’) ) {
    return trailingslashit( get_bloginfo(‘url’) ) . ‘?cat=’ . $spEvents->eventCategory() . ‘&eventDisplay=month’;
    } else {
    return trailingslashit( get_bloginfo(‘url’) ) . $spEvents->getCategoryBase() . ‘/’ . strtolower( The_Events_Calendar::CATEGORYNAME ) . ‘/month’;

    It looks like it is displaying the “else” path and not the permalink_structure

    But I do not know how to fix this

    Showing progress here…..
    So I went into the

    the-events-calendar.php file and changed the else path of

    I changed the /month to /2010-03:

    return trailingslashit( get_bloginfo(‘url’) ) . $spEvents->getCategoryBase() . ‘/’ . strtolower( The_Events_Calendar::CATEGORYNAME ) . ‘/2010-03’;

    and it worked…..

    Next step is to figure out how to dynamically populate the date there…..

    I’ve found where the problem is occurring:

    the-events-calendar.php lines 1184-1189:

    if ( isset ( $wp_query->query_vars['eventDate'] ) ) {
    	$this->date = $wp_query->query_vars['eventDate'] . "-01";
    } else {
    	$date = date_i18n( The_Events_Calendar::DBDATEFORMAT );
    	$this->date = str_replace( substr( $date, 8 ), '01', $date );

    When there is no event selected (which would be normal going to the calendar view, called “month”), that last line takes over to construct the date passed to the grid creator.

    substr($date,8) pulls out the ‘day’ digits of the month, since the date looks like this: YYYY-MM-DD and the 8th character is the first D, so the substr returns the DD part (which, today, is 03… see where the problem is yet?). The whole date is 2010-03-03.

    the str_replace tells it to check the $date (which is 2010-03-03) for the string figured out above (supposed to be the day pair) which turns out to be 03, and replace it with 01. So the date that is being calculated is now 2010-01-01 as both instances of the 03 were replaced with the 01. This must have also happened on February 2nd… unless there has been an update which modified this since then.

    What I did to fix it, and I’m not sure why you’d always want the month view to default to highlighting the first day of the month, was to comment out this line:

    //$this->date = str_replace( substr( $date, 8 ), '01', $date );
    (the // comments out the line)

    and change it to this:
    $this->date = $date;

    This seems to work, and it also serves to highlight what day is “today” on the month view.

    I don’t think it breaks anything, but perhaps the people who wrote this could make sure I haven’t crippled anything. 🙂

    On the up-side, of course… it should work perfectly well tomorrow (2010-03-04) and not break again until April 4th (2010-04-04).

    Hope that helps someone.

    worked for me…..

    but if you notice, the link “calendar” still has the wrong a href

    hmarcbower is mostly right.

    This is fixed and will be released with the next version. To fix now, find the line of code hmarcbower refers to in the-events-calendar.php


    $this->date = str_replace( substr( $date, 8 ), '01', $date );


    $this->date = substr_replace( $date, '01', -2 );

    As mentioned above, this bug causes the wrong date to be displayed 11 times a year, whenever the date matches the month number ( like today, 03-03-2010 ).

    Contrary to the above post, do not simply use $this->date = $date. The search and replace that changes the date to the first of the month needs to be in there in order for the query of events to include the entire month.


Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘[Plugin: The Events Calendar] clicking on calendar does not show me events’ is closed to new replies.