Making WordPress.org

Opened 19 months ago

Closed 19 months ago

Last modified 19 months ago

#5119 closed defect (fixed)

Searching for a country location returns world-wide results

Reported by: dd32 Owned by: dd32
Milestone: Priority: normal
Component: Events API Keywords:

Description (last modified by dd32)

A search for a country-level location, such as Germany, Australia or Indonesia currently results in events world-wide being returned.

For example: https://api.wordpress.org/events/1.0/?location=Germany currently returns:

  "sandboxed": false,
  "location": {
    "country": "DE",
    "description": "Germany"
  "events": [
      "type": "meetup",
      "title": "WordPressもくもく会@千葉 20年3月の会",
      "url": "https://www.meetup.com/Chiba-WordPress-Meetup/events/269174440/",
      "meetup": "Chiba WordPress Meetup",
      "meetup_url": "https://www.meetup.com/Chiba-WordPress-Meetup/",
      "date": "2020-03-29 14:00:00",
      "end_date": "2020-03-29 18:00:00",
      "location": {
        "location": "online",
        "country": "US",
        "latitude": 35.610000610352,
        "longitude": 140.11000061035
      "type": "meetup",
      "title": "WordPress Warwickshire Kickoff ",
      "url": "https://www.meetup.com/WordPress-Warwickshire-Meetup/events/268859850/",
      "meetup": "WordPress Warwickshire Meetup",
      "meetup_url": "https://www.meetup.com/WordPress-Warwickshire-Meetup/",
      "date": "2020-03-30 18:00:00",
      "end_date": "2020-03-30 19:30:00",
      "location": {
        "location": "Warwickshire, United Kingdom",
        "country": "gb",
        "latitude": 52.497497558594,
        "longitude": -1.4766750335693
      "type": "meetup",
      "title": "WordPress Hangout (Online)",
      "url": "https://www.meetup.com/WordPress-Montclair-Meetup/events/269614290/",
      "meetup": "WordPress Montclair Meetup",
      "meetup_url": "https://www.meetup.com/WordPress-Montclair-Meetup/",
      "date": "2020-03-30 19:00:00",
      "end_date": "2020-03-30 21:00:00",
      "location": {
        "location": "online",
        "country": "FI",
        "latitude": 40.810001373291,
        "longitude": -74.220001220703

This should be restricted to returning all events in that country-location, rather than next-event-worldwide.

Change History (2)

#1 @dd32
19 months ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 9642:

Events API: Restrict events to a country when the location provided resolves to an entire country.

This fixes a search for Australia returning as a valid location, but showing US/JP/EU events rather than Australian events.

Fixes #5119.

#2 @dd32
19 months ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.