Views can no longer access Event Start/Stop time/date

emdalton - March 20, 2009 - 21:24
Project:Event
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

I just installed the March 16 2009 version of Event 5.x-2.x-dev and instantly started getting SQL errors on any page showing views of events. I checked the views, and found that all references to the start and stop times of the events had become invalid. I suppose this is related to the "rewrite of the event module to use the mysql datetime format instead of seconds since epoch" mentioned in the release notes. We use this function in a number of places and we really need it back. We're on Views 5.x-1.6. I tried installing Event Views and that did not expose the start and stop fields. I tried going back to my oldest version of Event 5.x-2.x-dev (dated June 2008) but was unable to regain access to the fields. Please help!

The SQL error is:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '>= 'now') AND (node_data_field_front_page.field_front_page_value = '1') ORDER B' at line 1 query: SELECT DISTINCT(node.nid), event_start, node.title AS node_title, node.changed AS node_changed FROM node node LEFT JOIN content_field_expire_date node_data_field_expire_date ON node.vid = node_data_field_expire_date.vid LEFT JOIN content_field_publication_date node_data_field_publication_date ON node.vid = node_data_field_publication_date.vid LEFT JOIN content_field_front_page node_data_field_front_page ON node.vid = node_data_field_front_page.vid WHERE (DATE_FORMAT(STR_TO_DATE(node_data_field_expire_date.field_expire_date_value, '%Y-%m-%dT%T'), '%Y-%m-%d') >= '2009-03-20') AND (node.status = '1') AND (DATE_FORMAT(STR_TO_DATE(node_data_field_publication_date.field_publication_date_value, '%Y-%m-%dT%T'), '%Y-%m-%d') <= '2009-03-20') AND (node.type IN ('event')) AND (.event_end >= 'now') AND (node_data_field_front_page.field_front_page_value = '1') ORDER BY ASC LIMIT 0, 10 in /var/www/html/users/wsbe/includes/database.mysql.inc on line 174.

#1

emdalton - March 30, 2009 - 20:03

Still unable to access event start/stop dates. Also, in views when I type "now" it is replaced by a numerical string. What happened?

#2

defconjuan - June 7, 2009 - 14:22
 
 

Drupal is a registered trademark of Dries Buytaert.