20091204 Duplicate entries show up on Upcoming Events (Clackamas)

After configuring a "view" to support an event calendar for Clackamas County, I posted an event, logged out, and discovered it appeared twice on the "Upcoming" block, but only once in the database. Some sort of permissions issue caused the duplicate to disappear when logged in as an administrator. Very strange.

The solution was to navigate -> Administer -> Site building -> Views -> calendar_event (the name of the view created for normal calendar items) -> Edit -> Upcoming -> Basic settings -> Distinct, and set "Yes".

What appears to be happening is that because there is both a start and end time for this event, there are two distinct date fields to search on and capture. From the database: "18 18 0 2009-12-09 02:00:00 2009-12-09 04:30:00 NULL", while other events had identical dates in both fields. Setting Distinct=Yes forces the view engine to doublecheck that each node is only displayed once for each actual event, not just the found unique dates and times.

Fascinating. I still don't know why that only happened outside of certain permission sets, but "Distinct" fixed it.

Republican News


News & Views