WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: The Events Calendar] clicking on calendar does not show me events (30 posts)

  1. picarillo
    Member
    Posted 4 years ago #

    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.

    -Bob

    bobpicarillo.net

  2. byandreasdotcom
    Member
    Posted 4 years ago #

    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

  3. dmacman
    Member
    Posted 4 years ago #

    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.

    D

  4. dmacman
    Member
    Posted 4 years ago #

    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.

    D

  5. dmacman
    Member
    Posted 4 years ago #

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

  6. picarillo
    Member
    Posted 4 years ago #

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

  7. bengie
    Member
    Posted 4 years ago #

    same here...glad I'm not the only one

  8. teejnits
    Member
    Posted 4 years ago #

    Same, and also the same that it just started happening today I believe.
    http://gracepolaris.org/category/events/month/

    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.

    Thanks,

    TJ

  9. ilsaro
    Member
    Posted 4 years ago #

    hi
    I am having the same problem!

    thank's a lot for help us.

  10. hmarcbower
    Member
    Posted 4 years ago #

    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. :)

  11. picarillo
    Member
    Posted 4 years ago #

    From what I can tell, the link is created by

    events_get_gridview_link();

    Example on the list.php page -

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

    </span>

  12. picarillo
    Member
    Posted 4 years ago #

    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

  13. picarillo
    Member
    Posted 4 years ago #

    Showing progress here.....
    So I went into the

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

    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.....

  14. hmarcbower
    Member
    Posted 4 years ago #

    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.

  15. picarillo
    Member
    Posted 4 years ago #

    worked for me.....

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

  16. justinendler
    Member
    Posted 4 years ago #

    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

    Change:

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

    To:

    $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.

    Justin

  17. hmarcbower
    Member
    Posted 4 years ago #

    Excellent, thanks for the correct fix. :)

  18. sacredpractice
    Member
    Posted 4 years ago #

    thanks alot justin and marc! this fixed my problem as well.look forward to the next release.

  19. dmacman
    Member
    Posted 4 years ago #

    Thanks for the fix guys! Much appreciated... happy eventing.

  20. websherpa
    Member
    Posted 4 years ago #

    OK, this makes much more sense to me now, because the $this->date = $date doesn't work today because the year and month no longer both contain "10"

    so on 10/03/2010 it was causing a problem as well. Which explains why the problem appeared to occur spontaneously yesterday (and just as spontaneously reappear today).

  21. geektink
    Member
    Posted 4 years ago #

    Unfortunately, I'm still having this problem!
    Any help would be greatly appreciated.

    I am not a php programmer, so I don't even know what to look for. I just know that the category view shows nothing and the month view does.

    http://aslinsideatl.com/category/events/
    http://aslinsideatl.com/category/events/2010-03/

  22. ilsaro
    Member
    Posted 4 years ago #

    not work!!!

    please can u help me?

  23. justinendler
    Member
    Posted 4 years ago #

    @geektink
    Visiting those links, everything appears to be fine. Is the problem resolved? If not, can you give specifics?

    @ilsaro
    Any details? Links? If your problem is the same as described in this thread, updating the plugin should fix it because the fix is now included in the latest version.

    Justin

  24. jdavidingram
    Member
    Posted 4 years ago #

    I've just installed the plugin and am getting the same problem - links on the calendar aren't clickable/produce no results. It has also seemed to have disabled my navigation bar as well since those links are no longer clickable on the http://islandnature.ca/category/events/ calendar page. The event post itself at http://islandnature.ca/2010/03/big-day-birding-brant-wildlife-festival/ shows a similar disconnection with the main navbar links. Not sure if this is a theme conflict or something to do with the way my navigation is set up.

    Like the look of this calendar better (for the most part) than my current plugin (Calendar) which is pretty ugly as far as styling goes but not sure if I want to spend the time fiddling around with it. If anyone can suggest a quick fix I'll give it a go, if not I'll try another plugin.

  25. jdavidingram
    Member
    Posted 4 years ago #

    Note - I've pulled this post off my blog since the main navigation links don't work on the calendar page and the event post page.

  26. ilsaro
    Member
    Posted 4 years ago #

    hi
    this is my site http://www.evergreenpics.com/punkrockgigs
    and i use The Event Calendar Version 1.5.6

  27. illustrata
    Member
    Posted 4 years ago #

    Hi, I'm using 1.5.6 and I can see correct version of the code in the plugin. I'm still unable to get the grid/calendar view to show up when I click "calendar," it just stays in list view. http://69.89.31.227/~arzanaor/category/events/

    Somewhere else I should look? ack.

  28. Trevor Green
    Member
    Posted 4 years ago #

    I'm having a similar problem, when I first installed the plugin and created a sample event in the current month it work. I didn't try future events. I turned editing over to the client and now find that when select a different month it continues to render the current mother. I was knocking around in the code and the date it always seems to use to render is the current date. Not the selected month. I'm having trouble finding where the code reads those select boxes to render a different grid.
    Any help would be appreciated. It looks like I have the version with the changes listed above. So thats not it.

    http://www.compasshousingalliance.org.php5-10.dfw1-1.websitetestlink.com/category/events/

  29. TriangleAE
    Member
    Posted 3 years ago #

    Trevogre

    I visited your site, how did you solve your problem?

  30. samkim218
    Member
    Posted 3 years ago #

    Hey, I'm using 1.6.4 but I was getting a 404 in list view. So I changed the code below and turned pretty urls off.

    two lines on \views\datepicker.php

    ---------- 1 --------------------------
    $link .= '&eventDisplay=month&eventDate=';

    change to >>>>

    $link .= '?eventDate=';

    ---------- 2 --------------------------
    location.href = '<?php echo $link; ?>' + jQuery('#<?php echo $prefix; ?>events-year').val() + '-' + jQuery('#<?php echo $prefix; ?>events-month').val();

    change to >>>>

    location.href = '<?php echo $link; ?>' + jQuery('#<?php echo $prefix; ?>events-year').val() + '-' + jQuery('#<?php echo $prefix; ?>events-month').val() + '&eventDisplay=month';

    which solved the list view problem, but now when I change months it stays on January grid view and will not change. Could it be an issue with my date format in General Settings? The site is currently hosted on a shared domain.
    http://shared.transcends.net/~samesan/category/events?eventDate=2011-02&eventDisplay=month

    Any help would be appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic