WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
Today's event not displayed (34 posts)

  1. LizBlue
    Member
    Posted 3 years ago #

    I have just started using this plugin and I like it a lot, thanks! However, it drops the current day's event from the display, even though the event is scheduled for the evening and hasn't happened yet. I have checked my WP timezone and that is correct. All of my posts and other system timestamps are okay.

    Any ideas? Thanks.

  2. firstborn01
    Member
    Posted 3 years ago #

    I am having this same problem which is pretty inconvenient if somebody goes to check the time of an event on that day and can't find it.

  3. Adwiz
    Member
    Posted 3 years ago #

    I've noticed the same thing. Can someone point out where the reference is for the sidebar output? I can get my developer to modify the PHP function to only ignore items that have already finished and post his code change here. Or better yet, the plug-in authors can make that change. It shouldn't be very hard.

  4. amynmcgrath
    Member
    Posted 3 years ago #

    Modify the-events-calendar.class.php

    $query = "
    SELECT * FROM $wpdb->posts
    LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
    WHERE
    $wpdb->postmeta.meta_key = '_EventStartDate'
    AND $wpdb->postmeta.meta_value = CURRENT_DATE()";

    instead of CURRENT_DATE() replace with date()

  5. crownofviolets
    Member
    Posted 3 years ago #

    Thanks amynmcgrath! That fix worked perfectly! xoxo

  6. CyBeRkId2002
    Member
    Posted 3 years ago #

    Hi all,

    New here (and to php/html in general)

    I am having exactly the same problem as above. I have tried the fix suggested above (and checked it over several times) but it does not seem to resolve the problem. Anything else I could try?

    Thanks,
    Michael

  7. djenk
    Member
    Posted 3 years ago #

    I tried that fix, too, but it didn't work. Anyone have another idea?

    Thanks!

  8. amynmcgrath
    Member
    Posted 3 years ago #

    Did you make sure you have the time set correctly in your WordPress installation? Not sure why the solution works for some and not for others. My fix is still working for me.

  9. djenk
    Member
    Posted 3 years ago #

    Time is set correctly. Oddly enough, today's event is now displaying. I tried the fix above, it didn't work so I changed the php file back to how it was. The only other thing I did was to switch the event from "all day" to a specific time, and then back again, when specific time didn't work. Very odd.

    I'm glad it's working now but have no idea how long it will stay "fixed." Any other suggestions would be appreciated (for future reference.)

    thanks!

  10. urban1
    Member
    Posted 3 years ago #

    djenk, I followed your steps and achieved the same results. This fix will work for today's important events, but I have a feeling the glitch will be back tomorrow.

    Anyone have a permanent fix for displaying the current day's events in List View?

  11. amynmcgrath
    Member
    Posted 3 years ago #

    Not sure how to help. My fix (above) is still working for me with no problems. Do you have the latest version of WordPress installed?

  12. urban1
    Member
    Posted 3 years ago #

    amynmcgrath, Yes, I changed CURRENT_DATE() to date() on line 599 in file the-events-calendar.class.php

    I'm using the most current versions of WordPress(3.0.1) and The Events Calendar(1.6.4).

  13. amynmcgrath
    Member
    Posted 3 years ago #

    Apparently this issue has cropped up again. I've checked my code and my 'fix' is there, but again I've got events disappearing from the upcoming events a few hours before they should. Anyone else have any ideas? I'll keep trying things and will let you know if I figure it out.

    Would appreciate some help from the plug-in developer. It's a great plug-in, but this is a bug that needs to be fixed.

  14. amynmcgrath
    Member
    Posted 3 years ago #

    An upgrade to the plugin must have wiped out my fix (forgot about that).

    NOTE: I cannot make this code change inside the plugin editor in WordPress. I am able to make my 'fix' work only if I change it directly on the server through a text editor. May want to try that, urban1.

  15. urban1
    Member
    Posted 3 years ago #

    I had to make the change with a text editor, as well. My calendar's list view is currently showing today's events. Your fix must be working. Thanks for the update.

  16. amynmcgrath
    Member
    Posted 3 years ago #

    Today's events disappeared off the homepage upcoming events again. Does anyone else have any ideas? Perhaps their 'premium events calendar' works?

  17. djenk
    Member
    Posted 3 years ago #

    I don't think I have a fix for this, but I've found a workaround for my site (this will only work if you don't display start/end times in the listings. I don't on my site: http://bourbontheatre.com/)

    Although I tried the suggested edit to the php file mentioned above, it didn't really work so my php file is back to how it was originally.

    Here's what I have to do: When an item drops off the upcoming events list on the day it's actually taking place, I just change it from an all day event and set a time for that night, even if it's a day event. I've started doing this for all new events and it seems to work. For instance, if I have an event that starts at 2pm, I'll just put in a start time of 8pm or so and an end time of 11:55 or something. It works with all-day events as well.

    I assume there's a fix for this in the paid version and am not holding my breath for the developers to throw us a bone. However, if a developer happens to see this, please be aware that assuring us you've fixed this and maybe other issues would definitely make us lean towards purchasing your new version. In fact, I'm putting together a site next week that needs a similar plugin but I might try something else due to this problem. Please respond to this thread with either "Yes, this is absolutely, positively fixed in the new version" or maybe "Sorry, no dice." Should we take your silence as meaning the latter is the case?

  18. djenk
    Member
    Posted 3 years ago #

    I should clarify and say that when I have an event that starts at 2pm and enter in an 8pm start time, the actual start time is in the post content itself and no one ever sees the 8pm mention. Obviously if you're listing your start times in the widget or something, you're out of luck.

    Let's keep trying, though!

  19. gerobe
    Member
    Posted 3 years ago #

    I think I found the reason, why it worked for some people and for some not.

    In the code passage that amynmcgrath listed, replace

    CURRENT_DATE() with date('Y-m-d')

    This worked for me.

  20. elisacohen
    Member
    Posted 3 years ago #

    I tried these fixes and it drops today's date. Looking for a new plugin. It's too bad because this one has a nice set of lists and user features.

  21. amynmcgrath
    Member
    Posted 3 years ago #

    Agree. None of these fixes work.

  22. elisacohen
    Member
    Posted 3 years ago #

    What's weird is that when I select all day for an event, the events are not on the list until about noon. Then they appear. I made sure my WordPress site was set the right time in the general settings, but it makes me wonder why it would start working at noon.

  23. tarikouz
    Member
    Posted 3 years ago #

    Hi people,

    I think i found a solution.

    At least one that works for me.

    On the same file change:

    const DBDATETIMEFORMAT = 'Y-m-d';

    By doing that you will lose the ability of testing hours...

    bye

  24. ckueda
    Member
    Posted 3 years ago #

    Hi,

    Not sure what "By doing that you will lose the ability of testing hours..." means but that code change seems to have worked.

  25. amynmcgrath
    Member
    Posted 3 years ago #

    Well done, tarikouz. Looks like this fix works... at least for now. Thanks a bunch!

  26. LizBlue
    Member
    Posted 3 years ago #

    Could someone restate the solution from the beginning? I'm not a programmer. It sounds simple, but I'm not sure what I need to change and what I need to change it to. Thanks.

  27. amynmcgrath
    Member
    Posted 3 years ago #

    Modify the-events-calendar.class.php

    Find:
    const DBDATETIMEFORMAT = 'Y-m-d G:i:s';

    Change to:
    const DBDATETIMEFORMAT = 'Y-m-d';

  28. LizBlue
    Member
    Posted 3 years ago #

    Thanks!

  29. tarikouz
    Member
    Posted 3 years ago #

    To answer ckueda:

    I think you can only compare the event date with the current date without using hours.

    So if we are 21 dec 2010 10 am and that your event ended 21 dec 2010 5 am I think (i should try it) your event will still show on your event list.

  30. lelebart
    Member
    Posted 3 years ago #

    Modifying the-events-calendar.class.php
    from:
    const DBDATETIMEFORMAT = 'Y-m-d G:i:s';
    into:
    const DBDATETIMEFORMAT = 'Y-m-d H:i:s';
    should work too

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic