Hello,

I am new to signup.

When cron.php is running, this error is displayed:

# warning: pg_query() [function.pg-query]: Query failed: ERREUR: syntaxe en entrée invalide pour le type interval : « s.reminder_days_before days » LINE 1: ...EN tz.offset_dst ELSE tz."offset" END) - INTERVAL 's.reminde... ^ in /home/html/drupal/includes/database.pgsql.inc on line 139.
# user warning: query: SELECT n.title, n.nid, n.type, s.reminder_email, s.forwarding_email, e.event_start AS event_start, e.timezone FROM node n INNER JOIN signup s ON s.nid = n.nid INNER JOIN event e ON n.nid = e.nid INNER JOIN event_timezones tz ON e.timezone = tz.timezone WHERE (s.send_reminder = 1) AND (n.type = 'formation') AND (('2009-08-22 17:21:40' > ((e.event_start - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END) - INTERVAL 's.reminder_days_before days'))) AND (('2009-08-22 17:21:40' <= ((e.event_start - CASE WHEN tz.is_dst = 1 THEN tz.offset_dst ELSE tz."offset" END)))) in /home/html/drupal/sites/all/modules/signup/includes/cron.inc on line 46.

The error comes from INTERVAL 's.reminder_days_before days' which is not well merged.

Will investigate and report back. If you can fix it easily, go ahead.

Kind regards,
Jean-Michel

Comments

dww’s picture

Are you using pgsql? From a brief look at includes/event.6x-2.inc it sort of looks like it. I have no good way to test this right now, and I'll be completely offline for 2 weeks starting Sunday morning (and have a huge todo list to accomplish before I leave). But please investigate and provide a patch that fixes it if you can. I'll commit once I return.

Thanks,
-Derek

dww’s picture

Status: Active » Closed (duplicate)

In fact, yeah, this is almost certainly duplicate with #549018: Incorrect SQL syntax for INTERVAL in Signup cron job on PostgreSQL. Please answer there, not here. Thanks.

liam morland’s picture

Issue tags: +PostgreSQL

Tagging