Support #15654
closedNumerous Copies of Events showing up
0%
Description
Via ZenDesk, Amy Wolfe writes:
I’m working on a site for the CUNY Central Office of Library Services (OLS) (https://cunyols.commons.gc.cuny.edu/) (URL: https://cunyols.commons.gc.cuny.edu/) 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.
Files
Related issues
Updated by Boone Gorges over 2 years ago
- Assignee set to Raymond Hoh
Hm, strange. The items at https://cunyols.commons.gc.cuny.edu/wp-admin/edit.php?post_type=tribe_events all have the same post ID. And I only see one copy of each on the calendar. https://cunyols.commons.gc.cuny.edu/events/ 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?
Updated by Raymond Hoh over 2 years 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.
Updated by Raymond Hoh over 2 years 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: https://github.com/cuny-academic-commons/cac/commit/0e95f22cd4ee97cd3ce71e7f22662ff7b96cc931 (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: https://github.com/the-events-calendar/the-events-calendar/blob/51f7c88c0dda9b6b0f6c4b53ff80c7849a42e08b/src/Tribe/Admin_List.php#L35.
I've opened a support thread on their WP.org forum to see what they will say.
Updated by Raymond Hoh over 2 years ago
- Related to Bug #10704: the-events-calendar filling error log due to bad database queries added
Updated by Raymond Hoh over 2 years 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: https://github.com/cuny-academic-commons/cac/blob/master/wp-content/mu-plugins/tribe.php. Boone, can you take a look and see if this filter is still necessary?
Updated by Boone Gorges over 2 years 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 https://github.com/cuny-academic-commons/cac/commit/c0fe75fcd6eda3781bffeb0a83e198f09e13ffa7.
Updated by Raymond Hoh over 2 years ago
Hi Marilyn,
You can tell Amy that a fix is already in place for the duplicate events issue in the Events admin area.
Updated by Boone Gorges over 2 years ago
- Status changed from Staged for Production Release to Resolved