Closed (fixed)
Project:
Date
Version:
7.x-2.2
Component:
Date API
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2012 at 03:36 UTC
Updated:
9 Apr 2012 at 21:40 UTC
Removing date_field_get_sql_handler() from Date has broken signup-7.x-1.x-dev.
In signup/includes/date.inc the API is used by:
function _signup_date_reminder_sql($content_type) {
// Get the date field information for this content type.
$field = signup_date_field($content_type);
$start_field = $field['field_name'] . '_value';
// Figure out what TZ we want to do the date comparisons in.
$compare_tz = $field['settings']['tz_handling'] == 'none' ? date_default_timezone() : 'UTC';
// Get a DateAPI SQL handler class for this field.
$handler = date_field_get_sql_handler($field, $compare_tz);
// Find the current time in the appropriate TZ for this field.
$now_date = date_now($compare_tz);
// Need to enclose this in ' marks to use directly in the SQL.
$now = "'" . date_format($now_date, DATE_FORMAT_DATETIME) . "'";
// Extract the correct SQL to represent the start time.
$start_time = $handler->sql_field($start_field);
...
Comments
Comment #1
jeffersonjhunt commentedSo I found that this function is in date.module and not date.api. I'll work on a patch to signup as I assume its bad form for them to have used a private function in their code.
Any tips on how I should replace the function used by signup would be greatly appreciated.
Comment #2
jeffersonjhunt commentedThe open Signup module issue: #1452920: Fatal error caused by undefined date_field_get_sql_handler function
Comment #3
Lowell commentedsubscribing
Comment #4
greenwork commentedThanks for helping on this since its causing my cron to break making updates difficult. Disabling signup worked for the time being.
Comment #5
karens commentedSignup module can do the same thing in their own code. I'm adding it back temporarily and marking it deprecated until Signup can do something else.
http://drupalcode.org/project/date.git/commit/99ffc01