Hi,

I get a blank when trying to use %node_start_time in a confirmation or reminder email. However, [node:field-date] works (where field_date is the machine name).

Comments

r0bm1lls’s picture

Yup,

I get the same. I'm not sure how I would use [node:field-date] - I am using that field in the content type. Any ideas anyone?

Jerenus’s picture

 56 /**
  57  * Determine which scheduler backend to use for the given node type.
  58  *
  59  * @param $type
  60  *   Machine-readable name of the node type to test.
  61  *
  62  * @return
  63  *   'event' to use the event.module, 'date' for the date.module, or 'none' if
  64  *   the node type is untimed.
  65  */
  66 function _signup_get_node_type_scheduler($type) {
  67   if (module_exists('event') && variable_get('event_nodeapi_' . $type, 'never') != 'never') {
  68     return 'event';
  69   }
  70   if (module_exists('date')) {
  71     $date_field = variable_get('signup_date_field_' . $type, 0);
  72     if (!empty($date_field) && $date_field != 'none') {
  73       return 'date';
  74     }
  75   }
  76   return 'none';
  77 }

http://drupalcode.org/project/signup.git/blob/2d37f0e:/includes/scheduler.inc#l66

Are you missed the "event" or "date" module? Try to debug here, and this should be able to solve your problem.

webmaster.washuapo’s picture

Did you find a solution? Very few of the tokens seem to be working

iaminawe’s picture

I am also still battling with this[node:field-date] works but ouputs in the incorrect timezone.

I have date module installed

+1 for getting the %node_start_time working

VValdo’s picture

Issue summary: View changes

I noticed in another bug this code, which seems to have fixed the issue for me.

--- a/includes/date.inc
+++ b/includes/date.inc
@@ -81,10 +81,10 @@ function signup_content_type_fields() {
  */
 function _signup_date_get_node_scheduler($node) {
   $field = signup_date_field($node->type);
-  if (!empty($node->{$field['field_name']}[$node->language][0]['value'])) {
+  if (isset($node->{$field['field_name'] . '_value'})) {
     return 'date';
   }
-  if (isset($node->{$field['field_name'] . '_value'})) {
+  if (!empty($node->{$field['field_name']}[$node->language][0]['value'])) {
     return 'date';
   }
   return 'none';
@@ -510,7 +510,8 @@ function _signup_date_format_date($node, $include_to_date = FALSE) {
   if ($db_tz != $display_tz) {
     $date->setTimezone(timezone_open($display_tz));
   }
-  $format = date_formatter_format('default', $field['field_name']);
+  $format = date_formatter_format('default', $field['field_name'], $field['settings']['granularity']);
+
   $date_out = $date->format($format);
 
   if ($include_to_date) {

kkalashnikov’s picture

Hi VValdo,

It shows error for token replacement

Fatal error: Call to a member function value() on a non-object

entity/entity_token.tokens.inc on line 297

Thanks,

navalogan’s picture

Hi all,
i have this error when i run a cron:
Notice : Undefined index: timezone in _signup_get_sql_handler() (ligne 356 dans /home/plume/public_html/mda.preprod.plume.typhon.net/sites/all/modules/signup/includes/date.inc).
Has anyone encountered the same problem? any solutions..?

tsokura’s picture

#5 fixed the date problem for me too in reminder emails, though specifying the format of the displayed time/date seems to be challenging. The upper section of the patch fixed the following notice I was getting in the log when reminders were sent:

Notice: Undefined property: stdClass::$language in _signup_date_get_node_scheduler() (line 84 of /.../sites/all/modules/signup/includes/date.inc).