Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5404 closed defect (bug) (fixed)

Canceled Regional WordCamps are being shown in Dashboard Events widget

Reported by: rmarks's profile RMarks Owned by: coreymckrill's profile coreymckrill
Milestone: Priority: normal
Component: Events API Keywords:


WordCamp US, a regional WordCamp which was canceled in July, is showing in the WordPress Dashboard Events widget now that we're within two months of the event.

The code should look to see if the status = 'scheduled' before adding it to dashboards.

Reported in Slack in two places:

Attachments (1)

WCUS-events-widget.png (41.4 KB) - added by RMarks 4 years ago.

Download all attachments as: .zip

Change History (6)

#1 @RMarks
4 years ago

It looks like each of the regional WordCamps are hard coded. Here is the code I found for WCUS. Line 1037

#2 @coreymckrill
4 years ago

  • Owner set to coreymckrill
  • Status changed from new to assigned

#3 @coreymckrill
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 10223:

Events API: Remove canceled WCUS from pinned events

Comments out the regional camp data for WCUS. Better not to remove it entirely
since it may be used again next year.

Fixes #5404

#4 @RMarks
4 years ago

@coreymckrill what are your thoughts on automating these three regional WordCamps and how the get_regional_wordcamp_data function works.


  1. Build an array of regional wordcamp names (asia, europe, us).
  2. For each of these, query for the next WordCamp's info (title, url, date, end_date, location, country, latitude, longitude) where status is scheduled, date is in the future, and url contains the wordcamp's name.
  3. Populate the $events array to produce the same data in place today

For the third where clause condition (url contains the wordcamp's name), is there column in the wporg_events table that is indexed to support this?

#5 @coreymckrill
4 years ago

@RMarks I think we considered something like this a while back. Finding the right WordCamp post via the URL slug is the tricky part. There were some other considerations too, but I'm not remembering right now. Ultimately we decided that when there are only two or three regional camps that get pinned, it's not much effort to go in and update the hard coded data as needed. If we end up with a significantly larger number of these events, it will probably make sense to automate it.

Note: See TracTickets for help on using tickets.