HI,
I had a problem with events appearing twice on the event calendar, this happens only when you use the node_access module.
The problem is that when you start putting data into the node_access table, the query looking for events (event.module line 593) may result in a node id appearing more than once (it happens with the node_access_example module).
A simple solution was to put a DISTINCT atribute on the select, changing the line to -
$result = db_query('SELECT DISTINCT(n.nid) FROM {event} e INNER JOIN {node} n USING (nid) '. node_access_join_sql() .' WHERE '. node_access_where_sql() .' AND n.status = 1 AND e.start > %d AND e.start < %d ORDER BY e.start', $first, $last);
I guess a similar fix might be needed at line 1005.
Comments
Comment #1
killes@www.drop.org commentedThanks, fixed in cvs.
Comment #2
(not verified) commented