When creating a new session the time slots created do not appear in the form for selection. 5 time slots were created prior to creating the session.

Comments

japerry’s picture

ahh yes, this is true. Murr... the problem stems from figuring out the select list from a view thats shared amungst all the content types.

There are two paths however.. one for inserting a new session (node/add/session node/add/bof_session, etc) and one for editing a node (node/1234/edit)

I probably could embed php into the contextual filter argument to parse the url, its probably the quickest fix. Not sure whats the best way to go about a long term fix.

We are setting this view for the select box so only valid timeslots are selectable by a session, bof, or schedule item

langworthy’s picture

This problem was introduced in commit 214a3439.

japerry’s picture

The reason you cannot see a timeslot on creation is because of this issue

add session timeslot

There are two ways around this.
1) Add the session, and assign it to a group, then goto the session edit page and the timeslot should show up. IE here:
session with timeslot

2) We should fix the session page to run an ajax command when a group is selected so it re-queries the timeslot form item and returns relevant results.

japerry’s picture

StatusFileSize
new69.86 KB
new88.32 KB

adding images here

pwolanin’s picture

StatusFileSize
new4.96 KB

The reason the time slots doesn't show up on node/add seems ot be that they are using a contextual filter, and the not-yet-created node doesn't match.

The easy fix here is to create a selection view (or display) for each type: session, schedule_item, and bof. Why not go that route rather than a contextual filter?

Getting this to work is absolutely essential to restore the BoF scheduling using entity reference pre-populate!

See attached exported View.

Changes to the feature:

--- a/docroot/profiles/cod/modules/contrib/cod_support/cod_bof/cod_bof.features.field.inc
+++ b/docroot/profiles/cod/modules/contrib/cod_support/cod_bof/cod_bof.features.field.inc
@@ -105,7 +105,7 @@ function cod_bof_field_default_fields() {
   $fields['node-bof_session-field_session_timeslot'] = array(
     'field_config' => array(
       'active' => '1',
-      'cardinality' => '-1',
+      'cardinality' => '1',
       'deleted' => '0',
       'entity_types' => array(),
       'field_name' => 'field_session_timeslot',
@@ -138,7 +138,7 @@ function cod_bof_field_default_fields() {
           'view' => array(
             'args' => array(),
             'display_name' => 'entityreference_1',
-            'view_name' => 'cod_session_timeslot',
+            'view_name' => 'cod_bof_timeslot',
           ),
         ),
         'target_type' => 'field_collection_item',
@@ -149,7 +149,7 @@ function cod_bof_field_default_fields() {
     'field_instance' => array(
       'bundle' => 'bof_session',
       'default_value' => NULL,
-      'default_value_function' => '',
+      'default_value_function' => 'entityreference_prepopulate_field_default_value',
       'deleted' => '0',
       'description' => '',
       'display' => array(
@@ -182,7 +182,10 @@ function cod_bof_field_default_fields() {
       'settings' => array(
         'behaviors' => array(
           'prepopulate' => array(
-            'status' => 0,
+            'action' => 'disable',
+            'fallback' => 'none',
+            'skip_perm' => '0',
+            'status' => 1,
           ),
         ),
         'user_register_form' => FALSE,
index 866fa82..a1c6a55
--- a/docroot/profiles/cod/modules/contrib/cod_support/cod_bof/cod_bof.info
+++ b/docroot/profiles/cod/modules/contrib/cod_support/cod_bof/cod_bof.info
@@ -3,15 +3,14 @@ description = BoFs are self-scheduled, unconference style sessions
 core = 7.x
 package = COD
 php = 5.2.4
 dependencies[] = cod_session
-dependencies[] = commons_wysiwyg
 dependencies[] = entityreference
+dependencies[] = entityreference_prepopulate
 dependencies[] = features
 dependencies[] = field_group
 dependencies[] = options
 dependencies[] = strongarm
 dependencies[] = views
-dependencies[] = views_field_view
 features[ctools][] = field_group:field_group:1
 features[ctools][] = strongarm:strongarm:1
 features[ctools][] = views:views_default:3.0


hedley’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev

I've just tested the alpha2 and the latest dev branch and I can't see the time slots appearing at all - even after assigning an audience to the session node and editing.

This seems quite important to the some of main functionality of COD, I'll do some more testing to try and get my head around it all.

hedley’s picture

I've figured out how to get timeslots to appear in the session page - you first have to create a room and make that room available for that timeslot before you can then go to the session page to assign a time slot to a room.

mortona2k’s picture

How do you make a room available to a timeslot?
(I'm on a fresh git checkout)

mortona2k’s picture

Room has a field collection, field_room_slots_types_allowed, which is hidden. This is where you can set allowed session types and time slots to a room.

japerry’s picture

Assigned: Unassigned » japerry
StatusFileSize
new361.56 KB

Yes, it is hidden because we have another form to create those field collections. The screenshot below should shed some light on how to create these.

We need a better UI flow, but this -does- work if you go through the steps below in the screenshot.

Note* clear the cache with cc all or devel before going to this page. Each node save seems to make this form not render correctly.

peter.milan’s picture

Hello,
There are many notices on this page

Notice: Undefined index: cod_events_timeslots_3_form in drupal_retrieve_form() (line 763 of /home/pity/workspace/cod/includes/form.inc).
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'cod_events_timeslots_3_form' not found or invalid function name in drupal_retrieve_form() (line 798 of /home/pity/workspace/cod/includes/form.inc).
Notice: Undefined index: cod_events_timeslots_4_form in drupal_retrieve_form() (line 763 of /home/pity/workspace/cod/includes/form.inc).
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'cod_events_timeslots_4_form' not found or invalid function name in drupal_retrieve_form() (line 798 of /home/pity/workspace/cod/includes/form.inc).
Notice: Undefined index: cod_events_timeslots_19_form in drupal_retrieve_form() (line 763 of /home/pity/workspace/cod/includes/form.inc).
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'cod_events_timeslots_19_form' not found or invalid function name in drupal_retrieve_form() (line 798 of /home/pity/workspace/cod/includes/form.inc).

The reason why the form is not properly rendered is really strange. I found out that "cod_events_timeslots_page" function is calling drupal_get_form function, which should load some custom form_id. This form_id does not exist, and throws many notices.

I found, that the COD has implemented hook hook_forms, which should handle this custom form_id. But for some unknown reason, this hook is not called until the flush of cache. But in the documentation of hook_forms is written that this hook should be called in drupal_get_form function.

peter.milan’s picture

Implementation of hook cod_events_forms should be moved from cod_events/plugins/content_types/cod_events_pane.inc to cod_events/cod_events.module.

peter.milan’s picture

StatusFileSize
new1.52 KB

Here is patch from last comment:

peter.milan’s picture

Status: Active » Needs review
japerry’s picture

I *think* this works.. had to clear cache once, but haven't seen it re-occur. We really need to plan out the events dashboard though.

japerry’s picture

Status: Needs review » Fixed

Fixed! Thanks for the patch!

Sorry for the simultaneous fix but I was working on both of these at the same time.

http://drupalcode.org/project/cod_support.git/commit/d957530

Status: Fixed » Closed (fixed)

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

kevster’s picture

Issue summary: View changes

Im running 7.x-1.0-beta2 and have just run into this issue.I tried the above patch but getting error - cannot apply patch in selected context? Ive tried hand patching but its not an obvious one?

Thx for any help...

kevster’s picture

I couldnt get to the dashboard but managed to get to http://xxxx/admin/conference/events/1/schedule and then add timeslot > allowed types to each timeslot.

Im running on 7.x-1.0-beta2

Piyush5767’s picture

Hello

I am getting problem with Drupal Cod , I am using drupal 7x-1-beta 3 . I install the drupal Cod perfectally but I am getting problem in session timeslot as well as rooms . I am unable to see drupal timeslot as well as room insession form . I have try all the abov patch as well as the above images. Can any body please tell me how to include timeslot as well as rooms in drupal forms .

Please let me know how to solve this problem , because most of the developer occur with this problem . There is no need to forward the Overall COD Process , unless the basic problem is not solved.

Thanks
Piyush Sharma

Piyush5767’s picture

I am to reply @japerry’s that whatever path you include are not works . I try all the above patch of yours .
Thanks

Piyush5767’s picture

I re-edit the session node but then also no session time slot appears

Piyush5767’s picture

Status: Closed (fixed) » Active

Hello

I am getting problem with Drupal Cod , I am using drupal 7x-1-beta 3 . I install the drupal Cod perfectally but I am getting problem in session timeslot as well as rooms . I am unable to see drupal timeslot as well as room insession form . I have try all the abov patch as well as the above images. Can any body please tell me how to include timeslot as well as rooms in drupal forms .

I have Include all the path and update all the modules which is in drupal 7x beta 3 but unable to get timeslot in session form and do not even get room in session form

Thanks
Piyush Sharma

japerry’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

Hello, have you created a schedule yet? A schedule template is required to show timeslots on the session items. You can find the scheduler by going to your site -> Conference -> Events -> Manage Event -> Scheduler

Piyush5767’s picture

Thanks @japerry it works !!!

Piyush5767’s picture

Title: Time slots do not appear in session creation form » Wrong Time Apparing in the Event

http://www.screencast.com/users/Piyush5767/folders/Default/media/e32391fb-dff9-41f2-8cdf-1dfb3e6f8026

Please check the link above of the image , I have create a event but getting wrong time in the title field.

Thanks for your previous response!

  • japerry committed d957530 on 7.x-2.x
    Issue #1837324 and #2004080 by japerry, aburrows, peter.milan set a...

  • japerry committed d957530 on 7.x-1.x
    Issue #1837324 and #2004080 by japerry, aburrows, peter.milan set a...
lafasofamily’s picture

In Comment #26 it looks like Piyush5767 changed the title and nature of this issue. I can re-open if this is the correct thing to do.. but. I am getting the same issue as Piyush5767. My "date_label" field in the table cod_event_time is storing times as -5 hours what I enter which is -9 off of gmt for me here in New Hampshire, USA. Then when those date labels are displayed in the time slot edit form top (see piyush5767's screen print) and the schedule drag and drop editor they are displayed incorrectly. The dates are stored correctly in field_data_field_evttime_date and display correctly everywhere else. It looks as though Piyush5767 is having the same -5 hours to his entered times. I have the timezone set correctly for my site default and my admin user and for the events I am creating.
This issue is only a problem for me once a year when we create our yearly conference. We have to remember to add 5 hours to the times displayed in the drag and drop schedule editor. (Oh, by the way the drop down field in the session and scheduled item edit field seems to pull the same date_label field so I am seeing the incorrect times here too.)

lafasofamily’s picture

This is an update and correction to append to #29. The labels in the Time column of the drag and drop view are not changed when I go in and change the date_label field in the database, but the title on the edit time page is. So if the same piece of code creates the label to be stored in cod_event_time and creates the time to display in the time column then this is where the issue is.

lafasofamily’s picture

More info regarding #29 and #30. I have found that If I make the following change to cod_schedule.entity.inc: (Note that I commented out the part where getTimeLabel is adding the timezone offset) Both of my problems are solved.

The date_label is stored with the correct value and the time column in the scheduling pane (drag and drop interface) displays the correct time:

***
public function getTimeLabel($type = 'cod_time') {
$date_field1 = $this->field_evttime_date[LANGUAGE_NONE][0]['value'];
$date_field1 = new DateTime($date_field1);
$date_field1 = format_date(($date_field1->getTimestamp() /*+ $this->field_evttime_date[LANGUAGE_NONE][0]['offset']*/), $type);

$date_field2 = $this->field_evttime_date[LANGUAGE_NONE][0]['value2'];
$date_field2 = new DateTime($date_field2);
$date_field2 = format_date(($date_field2->getTimestamp() /**+ $this->field_evttime_date[LANGUAGE_NONE][0]['offset2']*/), $type);

return $date_field1 . '-' . $date_field2;

I'm not sure that this is an appropriate fix for everyone. I do not understand exactly why these dates are being stored as the times that they are occuring in the time zone of the conference and then this getTimeLabel function is adding back the offset as though they are being stored as GMT. It makes sense that they should always exist as times where the conference is occuring unless it is somehow a virtual conference whose attendees are in different time zones. I did implement COD using the support modules rather than the distribution. Could this be why I am seeing this and no-one else is. I did not change any configuration settings as to how the dates for the timeslots are being stored as it comes in the module.

kclarkson’s picture

Title: Wrong Time Apparing in the Event » Timeslots Auto-Title Showing Wrong Time

After adding time-slots in the scheduler view all of the times are 5 hours off. It appears to be an issue with the auto-title for the timeslot.

It would be nice to be able to give us the abilities to edit the auto-title somewhere. But I am assuming this is a custom entity and you hide that option from the UI.

kclarkson’s picture

Status: Postponed (maintainer needs more info) » Active
japerry’s picture

Hiding is correct, its supposed to be auto generated based on the Timezone of the event. I thought we had fixed this in 2.x though.. if this is an error in 1.x I'd suggest upgrading first and seeing if it still exists.

kclarkson’s picture

Status: Active » Closed (fixed)

@japerry

You are correct. This is fixed in the 2.x version!

Closing as fixed in 2.x