Start dates were all basically zeroes till I changed the event start variable in the signup_admin_form_extra function in the signup_event_5.x-2.inc file.

FROM:

function signup_admin_form_extra($signup_event) {
  return array(
    '#type' => 'markup',
    '#value' => event_format_date(event_explode_date($signup_event->event['start']), 'custom', variable_get('signup_date_string', 'D, M jS, g:i A')),
  );
}

TO:

function signup_admin_form_extra($signup_event) {
  return array(
    '#type' => 'markup',
    '#value' => event_format_date(event_explode_date($signup_event->event_start), 'custom', variable_get('signup_date_string', 'D, M jS, g:i A')),
  );
}
CommentFileSizeAuthor
#7 278739_signup_event2_admin_ui_bug.7.patch762 bytesdww

Comments

killes@www.drop.org’s picture

The first version is for event 5.2, the second for 5.1. It is unclear why signup would try to use the 5.2 .inc for event 5.1.

dww’s picture

Status: Active » Postponed (maintainer needs more info)

@killes: thanks for the info, just what I was looking for.

@ambereyes: what version of event.module are you using? Can you please post both the version string from event.info and the first comment line in event.module itself? Something like:

// $Id: event.module,v 1.348 2008/01/01 23:37:57 killes Exp $ 

Seems like either your local installation is screwy, or there's something funky going in with how signup.module decides which signup_event.* file to include, but looking at the code, I don't see how that's possible.

brianbrarian’s picture

I had the same issue as ambereyes, whose fix worked for me.

From my event.module:

// $Id: event.module,v 1.348.2.9 2008/05/17 21:47:05 killes Exp $

My event.info says:

version = "5.x-2.x-dev"

I wouldn't rule out the possibility that there is indeed something screwy with my local installation. But it's working now, so I'm happy.

dww’s picture

@brianbrarian, thanks for the info. However, I'm just as confused as before. ;) The version of event.module you're using is definitely using the 'event' array in the $node object:

// $Id: event.module,v 1.348.2.9 2008/05/17 21:47:05 killes Exp $ 
...
function event_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  // make sure it's an event enabled node
  if (variable_get('event_nodeapi_'. $node->type, 'never') != 'never') {
    switch ($op) {
      case 'load':
        global $user;
        event_include_files();
        $object = event_get_event_load($node->nid);

        return array('event' => array(
                       'start'              => $object->event_start,
                       'end'                => $object->event_end,
...

I'm completely confused. All I can imagine is that there are multiple versions of event.module present on your site, and somehow you're confused about which one is being used and which one you're looking at.

dww’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

Given no response in 6 weeks, I'm going to call this a "fixed" support request, unless someone can reopen with more concrete info about what's going on.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

dww’s picture

Assigned: Unassigned » dww
Category: support » bug
Status: Closed (fixed) » Needs review
StatusFileSize
new762 bytes

Ok, after testing #132142: Add setting to use site-wide date formatting strings instead of our own weird setting more closely with event 5.x-2.*, I see the bug now. ;)

signup_admin_form() is constructing a query via signup_admin_form_sql(). That calls signup_admin_form_sql(), which, in signup_event_5.x-2.inc is returning event_select() and e.timezone for the fields. So, we're just getting some raw fields in there.

Now, over in signup_admin_form_extra() when we're rendering this date-specific field in that admin UI, we're getting the $signup_event passed in, but that's just the object we got back from the db_query(), not a fully loaded node object.

So, I *think* this is the right solution here, and it seems to work, but it also seems to ignore the timezone (and I don't understand enough about the timezone code to know what's the right way to do this, since event_format_date() doesn't seem to know about timezones at all). :(

killes@www.drop.org’s picture

Status: Needs review » Reviewed & tested by the community

Seems ok.

dww’s picture

Status: Reviewed & tested by the community » Fixed

Cool, thanks. Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.