Schedule Display Bug

jaaronfarr - October 13, 2007 - 03:47
Project:Conference Organizing
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

To replicate the bug:

  • Create a new conference
  • Create a session, lock it into the schedule and publish it
  • Click on the Schedule menu link
  • No schedule is published

More importantly, you'll see that the dates that are shown on the schedule are one day after the date of the scheduled session. That is, if the session is scheduled on 26-NOV-2007, then the tabs at the top of the schedule (the jstabs) will contain the date 27-NOV-2007.

The problem is in a query in conference_organizing.module. The attached patch fixes the query by subtracting one from the day and properly sorting the results. I'm not sure if this is the correct way to fix this, but it works for me.

AttachmentSize
conference_organizing.module.patch1.25 KB

#1

matinfo - November 14, 2007 - 20:35

Me to I don't have schedule displayed correctly!

After different analyze, I see a problem with the "date range" argument of cod_schedule view (idem for cod_my_schedule).

in conference_organizing.module, line ~2737 in method conference_organizing_schedule, if I change:

'#content' => views_build_view('page', views_get_view('cod_schedule'), array($conference->nid, date('Y-m-d', $day_stamp))),

by

'#content' => views_build_view('page', views_get_view('cod_schedule'), array($conference->nid)),

the scheduler display correctly if your conference is only one day, but over loop if conf. is over 2 days and more!

with date('Y-m-d', $day_stamp) set, the SQL query look like:

SELECT DISTINCT(node.nid), node_data_field_schedule_start_time.field_schedule_start_time_value, node_data_field_schedule_start_time.field_schedule_start_time_value AS node_data_field_schedule_start_time_field_schedule_start_time_value, node_data_field_session_end_time.field_session_end_time_value AS node_data_field_session_end_time_field_session_end_time_value, node_data_field_track.field_track_value AS node_data_field_track_field_track_value, node.title AS node_title, node.changed AS node_changed, node_data_field_location.field_location_value AS node_data_field_location_field_location_value FROM node node LEFT JOIN content_type_session node_data_field_scheduled ON node.vid = node_data_field_scheduled.vid LEFT JOIN og_ancestry og_ancestry ON node.nid = og_ancestry.nid LEFT JOIN content_type_session node_data_field_schedule_start_time ON node.vid = node_data_field_schedule_start_time.vid LEFT JOIN content_type_session node_data_field_session_end_time ON node.vid = node_data_field_session_end_time.vid LEFT JOIN content_type_session node_data_field_track ON node.vid = node_data_field_track.vid LEFT JOIN content_type_session node_data_field_location ON node.vid = node_data_field_location.vid WHERE (node.type IN ('session')) AND (node.status = '1') AND (node_data_field_scheduled.field_scheduled_value IN ('1')) AND (og_ancestry.group_nid = 28) AND ((FROM_UNIXTIME(node_data_field_schedule_start_time.field_schedule_start_time_value) + INTERVAL (3600) SECOND)>='5580') AND ((FROM_UNIXTIME(node_data_field_schedule_start_time.field_schedule_start_time_value) + INTERVAL (3600) SECOND)<='5580') ORDER BY node_data_field_schedule_start_time_field_schedule_start_time_value ASC

I don't understand where come the value 5580 ?
(interval 3600 depend my timezone setting: GMT+1)

The DateAPI documentation say, date range need YYYY-MM-DD--YYYY--MM-DD but only YYYY-MM-DD is given!

Is come very urgent for me to find a solution, if some person have a idea of this, thanks for your experience with date range cck usage.

I'm new on drupal system, an cod profile is a very interesting project, but I found a lot of little things to be set before it will be correctly usable.

Here some of my troubles:
- some timezone / date format need set correctly (on cck files of cod profiles).
- some path set on profile need adapted/corrected with your web site corresponding path
- frontpage_field of session content type need to be recreated by drupal admin interface and set default to 1 other wise sessions is not displayed on conference view.
- more or less same problem with weight_field of session content type, not set the result the session is not displayed in the correct order!
- 1 hour (3600) less on time displayed on view cod_schedule, cod_my_schedule and cod_session view.
- need to modify method a wrong method to _chatroom_get_cache_file line ~2099

I really need a solution to display the schedule view correctly, thank for your support.

Mat

PS: the patch above is really not the solution, I'm corrected the problem of jaaronfarr by setting correctly the timezone of different fields of view conference and session and also on drupal global settings.

#2

cjensen - January 17, 2008 - 19:11

I had a different scheduling bug. It said no sessions had been scheduled. It turned out to be caused by a problem with the date module. A patch is available (a simple two line fix). The cvs head wasn't patched when I checked it. I didn't see a link to this patch elsewhere, so I thought I'd note it here for others.

Even having fixed the min/max date issue, the conference list still shows the conference as having past and my conference days are shown in reverse order in the schedule. Not sure what is going on there, but it's only a mild inconvenience.

 
 

Drupal is a registered trademark of Dries Buytaert.