Support #15654

Numerous Copies of Events showing up

Added by Marilyn Weber 4 months ago. Updated 3 months ago.

Priority name:
Category name:
WordPress Plugins
Target version:
Start date:
Due date:
% Done:


Estimated time:


Via ZenDesk, Amy Wolfe writes:

I’m working on a site for the CUNY Central Office of Library Services (OLS) ( (URL: I’m currently working on the site’s calendar and adding events.

I added two events manually but I’m running into a technical issue.

When I go to “Events” from the Dashboard left side menu, I’m taken to the “Events” page which instead of showing just 2 events, it shows 40 items over 2 pages.

The top menu shows All (2) | Published (2) | Trash (4).

However underneath the page shows 40 items over 2 pages. If I delete 1 of the items from the 40 all the duplicate items delete.

I’ve attached a screen shot for you to see the issue.

E9A401ECCB19492D8996D84AC3C28EF2.jpg (88.8 KB) E9A401ECCB19492D8996D84AC3C28EF2.jpg Marilyn Weber, 2022-03-17 09:49 AM

Related issues

Related to CUNY Academic Commons - Bug #10704: the-events-calendar filling error log due to bad database queriesResolved2018-11-14


#1 Updated by Boone Gorges 4 months ago

  • Assignee set to Raymond Hoh

Hm, strange. The items at all have the same post ID. And I only see one copy of each on the calendar. There must be a rogue filter modifying the query on the Dashboard page, or maybe a missing DISTINCT of some sort.

Ray, I'm partly out of pocket these next few days. Maybe you could take a look?

#2 Updated by Raymond Hoh 4 months ago

I looked at the main SQL query used to render the Events admin page and it looks like The Events Calendar might need to add in a DISTINCT clause somewhere.

We are currently running an older version of The Events Calendar, so I might bump the version we're using on production to see if this might be addressed.

I'll take a closer look in a few hours as I need to run some errands.

#3 Updated by Raymond Hoh 4 months ago

  • Category name set to WordPress Plugins
  • Status changed from New to In Progress

I tried updating The Events Calendar to the latest version, v5.14.1: (this is live on production). But that didn't solve the problem.

I did some further debugging and found that commenting out the following line fixed the problem:

I've opened a support thread on their forum to see what they will say.

#4 Updated by Raymond Hoh 4 months ago

  • Related to Bug #10704: the-events-calendar filling error log due to bad database queries added

#5 Updated by Raymond Hoh 4 months ago

  • Status changed from In Progress to Assigned
  • Assignee changed from Raymond Hoh to Boone Gorges

Someone from TEC got back to me and said it's probably caused by a custom configuration on our end and they are right. I've done some further digging and found that the problem is due to #10704.

On production, I've temporarily bailed out of our custom 'posts_clauses' filter for TEC: Boone, can you take a look and see if this filter is still necessary?

#6 Updated by Boone Gorges 3 months ago

  • Status changed from Assigned to Staged for Production Release
  • Target version set to 1.19.6

Looks like it may no longer be necessary. I've removed it in

#7 Updated by Marilyn Weber 3 months ago

What should I tell Amy Wolfe? Thanks!

#8 Updated by Raymond Hoh 3 months ago

Hi Marilyn,

You can tell Amy that a fix is already in place for the duplicate events issue in the Events admin area.

#9 Updated by Boone Gorges 3 months ago

  • Status changed from Staged for Production Release to Resolved

Also available in: Atom PDF