WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
Past Events not being displayed (34 posts)

  1. GolfDawgg
    Member
    Posted 1 year ago #

    I just upgraded to 3.0 and now "show previous events" link displays no events. xxx/events/past is the link it's using. Did I wipe out some page templates or something when I upgraded?

    Thanks in advance.

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Hey GolfDawgg - thanks for posting this, and for updating early. I apologize on behalf of the whole team for the inconvenience you've faced here.

    Does this occur even after you resave (flush) permalinks? The "past" events template isn't something that should have been changed much on this end, so I wonder if it's not a permalinks- or cache- related issue. if you can try clearing both and let me know whether the issue persists (with a link to the site-in-question, if possible) it'd be helpful. We can do our best to try and get it sorted for you from there.

  3. mdd061000
    Member
    Posted 1 year ago #

    I can confirm this bug. I have the same issue with my page. I have flushed permalinks and the problem persists.

    My site is currently password protected so I can't send you a link.

    Thanks

  4. aaronwrixon
    Member
    Posted 1 year ago #

    I'm seeing this as well after a permalink flush.

    Live site: http://www.lawsocietygazette.ca/events/

    No upcoming events exist but until I upgraded there were about 40 recent events.

  5. Nosebolt
    Member
    Posted 1 year ago #

    Same issue since upgrade, also event name link in widget goes to what ever page you are currently on

    site at http://competitioncarving.com

  6. aaronwrixon
    Member
    Posted 1 year ago #

    I should say that my link above no longer reflects the problem because I rolled back to 2.011

  7. mdd061000
    Member
    Posted 1 year ago #

    Here's an example of the issue. Vanilla wordpress, default theme, no other plugins.

    https://saurus-rex.info/blog/events

  8. Yusha50
    Member
    Posted 1 year ago #

  9. dcrosbie
    Member
    Posted 1 year ago #

    Yes me too, same problem with past events link showing no events even though I do see the events in the backend. I didn't upgrade from a previous version though, I installed this for the first time on a new website (I have used the old events calendar on other websites no problem).

    http://www.worldlywomen.ca/events/

  10. mdd061000
    Member
    Posted 1 year ago #

    The events are present in my backend as well, this definitely seems to be an issue with the previous events display page.

  11. Ned Zimmerman
    Member
    Posted 1 year ago #

    Same for me.

  12. mdd061000
    Member
    Posted 1 year ago #

    Okay, so I think I've found the issue. The query for past events is a mess.

    $wp_the_query currently shows

    SELECT SQL_CALC_FOUND_ROWS DISTINCT
      wp_posts.*,
      wp_postmeta.meta_value as EventStartDate,
      tribe_event_duration.meta_value as EventDuration,
      DATE_ADD(CAST(wp_postmeta.meta_value AS DATETIME),
       INTERVAL tribe_event_duration.meta_value SECOND) as EventEndDate  FROM wp_posts
    LEFT JOIN wp_postmeta as tribe_event_duration
      ON ( wp_posts.ID = tribe_event_duration.post_id AND
      tribe_event_duration.meta_key = '_EventDuration' )
    WHERE 1=1  AND
     wp_posts.post_type = 'tribe_events' AND
     (wp_posts.post_status = 'publish') AND
     DATE_ADD(CAST(wp_postmeta.meta_value AS DATETIME), INTERVAL tribe_event_duration.meta_value SECOND)  < '2013-07-09 13:31:22'
    ORDER BY wp_posts.post_date DESC LIMIT 0, 5

    There is no postmeta row with the key '_EventDuration' There are only start and end date keys. The query should read:

    SELECT SQL_CALC_FOUND_ROWS DISTINCT
      wp_posts.*,
      tribe_event_start.meta_value as EventStartDate,
      tribe_event_end.meta_value as EventEndDate,
    TIMESTAMPDIFF(SECOND,tribe_event_start.meta_value,tribe_event_end.meta_value) as EventDuration
    FROM wp_posts
    LEFT JOIN wp_postmeta as tribe_event_start
      ON ( wp_posts.ID = tribe_event_start.post_id AND
      tribe_event_start.meta_key = '_EventStartDate' )
    LEFT JOIN wp_postmeta as tribe_event_end
      ON ( wp_posts.ID = tribe_event_end.post_id AND
      tribe_event_end.meta_key = '_EventEndDate' )
    WHERE 1=1  AND
    wp_posts.post_type = 'tribe_events' AND
    (wp_posts.post_status = 'publish') AN
     tribe_event_end.meta_value < '2013-07-09 13:31:22'
    ORDER BY wp_posts.post_date DESC LIMIT 0, 5

    When I run this query against my db it returns the past events. Now that I know the proper query I just need to figure out where in the PHP code this query is sent.

    Any help would be appreciated.

  13. mdd061000
    Member
    Posted 1 year ago #

    Okay, so I think I was barking up the wrong tree with modifying the query. The issue is really that there is no postmeta row with the key _EventDuration. When I create those rows manually, things work a little better. There is still an issue with the column wp_postmeta.meta_value.

    wp_postmeta is used without having been joined. This query is missing a JOIN statement.

  14. Ned Zimmerman
    Member
    Posted 1 year ago #

    I was able to fix this by adding '_EventDuration' to the $metaTags array in lib/the-events-calendar-class.php as shown:

    public $metaTags = array(
    			'_EventAllDay',
    			'_EventStartDate',
    			'_EventEndDate',
    			'_EventDuration',
    			'_EventVenueID',
    			'_EventShowMapLink',
    			'_EventShowMap',
    			'_EventCurrencySymbol',
    			'_EventCost',
    			'_EventURL',
    			'_EventOrganizerID',
    			'_EventPhone',
    			'_EventHideFromUpcoming',
    			self::EVENTSERROROPT
    		);

    And by inserting the following after line 101 of lib/tribe-event-api.class.php:

    $data['EventDuration'] = $endTimestamp - $startTimestamp;

    The _EventDuration key was not being stored, as mdd061000 discovered, so I hacked this together to save it (as the duration in seconds). Would appreciate feedback from the developers—my past events page works now, at any rate.

  15. mdd061000
    Member
    Posted 1 year ago #

    This fixes the issue mentioned here:

    http://wordpress.org/support/topic/multi-day-events-only-shown-on-first-day

    But I still have an empty past events page.

    The query is ending in error for me bacause wp_postmeta (the source of the startDate) is not being joined in my query.

  16. Ned Zimmerman
    Member
    Posted 1 year ago #

    I had to edit and save all of my events to create that piece of metadata—have you done this? It wouldn't work otherwise.

  17. mdd061000
    Member
    Posted 1 year ago #

    Well, I manually added the _EventDuration metadata, but I also tried editing and saving the events. They still don't show up for me.

  18. mdd061000
    Member
    Posted 1 year ago #

    Have you made any other edits to the plugin? Aside from the changes we talked about I'm running vanilla everything.

  19. Ned Zimmerman
    Member
    Posted 1 year ago #

    Haven't made any other edits to the plugin, but I do have a custom list view set up.

  20. mdd061000
    Member
    Posted 1 year ago #

    Would you mind running checking the value of $wp_the_query on your past events page and sending me the result? I'm curious if you are running a different query than I am.

  21. Ned Zimmerman
    Member
    Posted 1 year ago #

    This is what I've got on the past events page:

    SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, wp_postmeta.meta_value as EventStartDate, tribe_event_duration.meta_value as EventDuration, DATE_ADD(CAST(wp_postmeta.meta_value AS DATETIME), INTERVAL tribe_event_duration.meta_value SECOND) as EventEndDate FROM wp_posts INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) LEFT JOIN wp_postmeta as tribe_event_duration ON ( wp_posts.ID = tribe_event_duration.post_id AND tribe_event_duration.meta_key = '_EventDuration' ) WHERE 1=1 AND wp_posts.post_type = 'tribe_events' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') AND (wp_postmeta.meta_key = '_EventStartDate' ) AND DATE_ADD(CAST(wp_postmeta.meta_value AS DATETIME), INTERVAL tribe_event_duration.meta_value SECOND) < '2013-07-09 18:25:01' ORDER BY DATE(wp_postmeta.meta_value) DESC, TIME(wp_postmeta.meta_value) DESC LIMIT 0, 10

  22. mdd061000
    Member
    Posted 1 year ago #

    Thanks! That helps a lot. For some reason my query doesn't have that inner join of wp_postmeta. That's what I'm missing. Do you know where that inner join comes from?

  23. mdd061000
    Member
    Posted 1 year ago #

    Wait, that was my fault. A bit of debug code that I had added was preventing the INNER JOIN from showing. Once that was removed things started working for me.

    Thanks!

  24. Ned Zimmerman
    Member
    Posted 1 year ago #

    Perfect, glad I could help!

  25. Jeana
    Member
    Posted 1 year ago #

    Wow guys, I'm sorry but this is a real mess. I performed the fix as described above and while that did solve the problems I was having with past events, I've realized that NONE of the event dates are correct since the upgrade. Also, for some reason, a few posts from other categories have shown up in the calendar! How is that even possible? I'm afraid I have no choice but to roll back to 2.0.11. It's really unfortunate because I just spent about 3 hours working on a problem that I will never be compensated for. :( (Before I'm flamed, let me preface this by saying that I have paid for Pro - not just the open source version.)

  26. jtlulumom
    Member
    Posted 1 year ago #

    I'm not quite sure exactly how the problem was resolved for mdd061000 from Ned Zimmerman, I'm not that good with PHP.

    I haven't edited my code at all, just performed the update and it's not working. So we should add Ned's code to which file to fix the problem?

    I'm actually thinking of what Jeana said and rolling back to 2.0.11.

  27. packerman72
    Member
    Posted 1 year ago #

    This is a majorly poor update here. Old plugin worked like a dream and now im gridlocked with no functionality at all.

    Hoping Modern Tribe team will jump on this issue ASAP.

  28. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Hey guys. Thanks for the follow-ups here. Jonah has been hitting the forums here actively the past few days but this thread got missed - my apologies for not electing to receive email notifications upon my first reply. I dropped the ball here.

    I appreciate each of you following up and confirming this is a problem. While we did QA the product actively before release, it's obvious that we failed you guys by not catching the issue here and we apologize for that. I know what it's like to update a site and find yourself with a shell of its former self. It looks like a solution that works for some has bene posted here, and for anyone who is still interested in downgrading, the 2.0.11 tagged release is available right here: http://downloads.wordpress.org/plugin/the-events-calendar.2.0.11.zip. However it's important to note that - while we're in the first few weeks of the 3.0 launch - we are providing deeper support here on dot-org. Once the dust has settled from 3.0, we're going to revert to hitting these forums once a week and won't be able to provide as deep a level of assistance as we are now. So if you are facing 3.0-specific issues know that we do have more bandwidth than normal to help you out for the next couple weeks.

    This issue related to end date/passed events unquestionably an issue with the current codebase, and we've been working hard to get it patched over the past couple days. A patch will be deployed in either the 3.0.2 release that is shipping this week....likely tomorrow. I'll drop in here and let folks know when that is available but I would certainly be interested in hearing whether the issues persist from there.

    While we absolutely appreciate the situation this has put some of you in, I'm admittedly a bit disappointed to see comments stating the release is a "majorly poor update" when we're still very early in the 3.x lifecycle. As with any major release, the early builds are rarely ever 100% bug-free...and the early adopters are likely to be those who are first to experience/report those. At a certain point we made a decision to release with a stable codebase that might have a few issues and patch them from there. Luckily, the majority of feedback we've seen so far has been overwhelmingly positive...and I'm hoping we'll have those of you in the less-than-enthused camp switching sides as soon as we get these issues addressed.

    Finally: it sounds like there are a couple of other folks in here, such as Jeana, facing problems that are significant but seem unrelated to the core matter at hand (ie, posts appearing on the calendar).Those issues aren't ones I've seen reported elsewhere nor have I been able to recreate, which makes me think something else is at play here specific to certain installs. If you open a new thread for that issue we can absolutely try to help you out.

    Thanks again to everyone for their patience - and apologies on behalf of the whole team for your experiences so far. Within 24 hours this should be a non-issue...and if you see anything else, know we are committed to helping get those sorted.

  29. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    ...and that may well be the least grammatically-correct reply I've ever posted :) Let me know if any of the points wrought with grammatical errors above don't make sense, and I can clarify for anyone as needed. Thanks!

  30. tributeWP
    Member
    Posted 1 year ago #

    Thank you!
    Looking forward to the next update. The Events Calendar is great and I'm glad to not have to downgrade or monkey around in the code too much.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic