I've upgraded from Drupal 5.20 > Drupal 6.19 and have everything work apart from the events module which outputs this warning:

* user warning: query: SELECT n.nid, n.title, n.type, e.event_start AS event_start_orig, e.event_end AS event_end_orig, e.timezone, e.has_time, e.has_end_date, tz."offset", tz.offset_dst, tz.dst_region, tz.is_dst, e.event_start - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END AS event_start_utc, e.event_end - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END AS event_end_utc, e.event_start - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END + INTERVAL '0 seconds' AS event_start_user, e.event_end - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END + INTERVAL '0 seconds' AS event_end_user, e.event_start - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END + INTERVAL '-3600 seconds' AS event_start, e.event_end - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END + INTERVAL '-3600 seconds' AS event_end, e.event_start - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END + INTERVAL '-3600 seconds' AS event_start_site, e.event_end - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END + INTERVAL '-3600 seconds' AS event_end_site, tz.name as timezone_name FROM node n INNER JOIN event e ON n.nid = e.nid INNER JOIN event_timezones tz ON tz.timezone = e.timezone WHERE n.status = 1 AND ((e.event_start >= '2010-10-31 00:00:00' AND e.event_start <= '2010-12-01 23:59:59') OR (e.event_end >= '2010-10-31 00:00:00' AND e.event_end <= '2010-12-01 23:59:59') OR (e.event_start <= '2010-10-31 00:00:00' AND e.event_end >= '2010-12-01 23:59:59')) GROUP BY n.nid HAVING (event_start >= '2010-11-01 00:00:00' AND event_start <= '2010-11-30 23:59:59') OR (event_end >= '2010-11-01 00:00:00' AND event_end <= '2010-11-30 23:59:59') OR (event_start <= '2010-11-01 00:00:00' AND event_end >= '2010-11-30 23:59:59') ORDER BY event_start ASC

After copy/pasting the query directly into my postgreSQL database, the error error says:

ERROR: column "n.title" must appear in the GROUP BY clause or be used in an aggregate function

I tried added "n.title" in the GROUP BY clause, only to try again and get the same error message, but with the next selection, then the next.. and so on.

The level of the select query is beyond my knowledge and wondered if this is a bug.

If I disable the event module and then uninstall, the database table is deleted and I can create a new event and it be displayed in the "Calendar for browsing events" block.

Any suggestions?

I followed a posting to use Date Tools to import dates across thinking that may solve the solution. I managed to get them imported over, tweaked the calendar view and got the events to display in the calendar, only to find the clickable link to "Calendar" at the end of each event was broke.

I then went back to an earlier database backup and started again, but after 3 weeks feel I'm no closer to getting the events module to work after upgrading from Drupal 5 > 6.

Is it the database query that's broke?

Comments

japerry’s picture

Status: Active » Closed (outdated)

Event for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.