dragging a session to a timeslot of a room
google gives the folowing error
500 internal server Error
Failed to load resource xxxxx/ajax/cod-schedule/update-session

end @ jquery.min.js?v=1.7.2:4f.extend.ajax @ jquery.min.js?v=1.7.2:4f.(anonymous function) @ jquery.min.js?v=1.7.2:4$.sortable.receive @ cod_schedule.js?nqmbn7:18e.Widget._trigger @ jquery.ui.widget.min.js?v=1.10.2:4t.widget._trigger @ jquery.ui.sortable.min.js?v=1.10.2:4(anonymous function) @ jquery.ui.widget.min.js?v=1.10.2:4(anonymous function) @ jquery.ui.sortable.min.js?v=1.10.2:4t.widget._clear @ jquery.ui.sortable.min.js?v=1.10.2:4(anonymous function) @ jquery.ui.widget.min.js?v=1.10.2:4t.widget._mouseStop @ jquery.ui.sortable.min.js?v=1.10.2:4(anonymous function) @ jquery.ui.widget.min.js?v=1.10.2:4e.widget._mouseUp @ jquery.ui.mouse.min.js?v=1.10.2:4(anonymous function) @ jquery.ui.widget.min.js?v=1.10.2:4a._mouseCapture._mouseDistanceMet._mouseDelayMet._mouseUpDelegate @ jquery.ui.mouse.min.js?v=1.10.2:4f.event.dispatch @ jquery.min.js?v=1.7.2:3h.handle.i @ jquery.min.js?v=1.7.2:3

Comments

japerry’s picture

Priority: Normal » Critical
Issue tags: +cod 7.x-1.0 radar

I think this might be fixed in Beta 10 / Dev. Needs to be verified though.

japerry’s picture

Project: Conference Organizing Distribution » Conference Organizing Distribution Support Modules
Version: 7.x-1.0-beta91 » 7.x-1.x-dev
pcorbett’s picture

I haven't quite nailed down the exact root cause, but it seems if there's a slot in the scheduler (/admin/conference/[#]/schedule) that has already been set to hold a session, for example, and you attempt to "edit timeslot" and save OR try to drag and drop a session to it, it results in:

Exception: Unable to save a field collection item without a valid reference to a host entity. in FieldCollectionItemEntity->save() (line 520 of /profiles/cod/modules/contrib/field_collection/field_collection.module).

When we set a new timeslot to have a session assigned to it, we don't get the error.

It seems that perhaps some kind of entity reference is being deleted inadvertently.

We're on Beta 9

pcorbett’s picture

Just updated to beta11-dev and issue still remains:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/conference/1/schedule/ajax/edit/121/11
StatusText: Service unavailable (with message)
ResponseText: 

Also, PHP error associated is:

Exception: Unable to save a field collection item without a valid reference to a host entity. in FieldCollectionItemEntity->save() (line 520 of /profiles/cod/modules/contrib/field_collection/field_collection.module).

When we try to save after attempting to edit a (particular) timeslot in order to make available to schedule a session to.

We're not sure why this particular slot is having the issue and it's not listed as an available slot to schedule if you edit a session.

mrconnerton’s picture

The core problem here was that the timeslots they were trying to drag a session into were no longer connected to their host entity. The solution was to delete the timeslot. Looking at the html of the timeslot, I found the id and then went to http://example.com/field-collection/field-event-timeslots/[timeslot-id]. Made sure it was the right one and deleted it. There is no button to delete you have to put in /delete. In our case it was id 66 so the url was http://example.com/field-collection/field-event-timeslots/66/delete.

With the timeslot deleted we could drag the session in and it would auto create a new one.

With that said, we either need:

  1. A way for timeslots to auto correct themselves. Since the rooms and times have a reference to the group, it would be pretty simple to grab that nid and reset the host of the field collection
  2. If we didn't want this to be automatic, then we could show a warning message with a manual button press that would do the same thing.

While I think the need for this is mostly with legacy sites with < beta9, if scheduling started before then, then its possible this could exist. I propose:

  1. When you view the scheduler we run a test to scan the field collections.
  2. If we find any without a host, we show a warning with a button to fix (or just auto fix)
  3. The fix would load of the collection entity, look for a gid on the room or time and set the host to it.
  4. If we can't find a gid on either or they just haven't been set, then we simple delete the timeslot
  5. To test we would create a conference, add a few rooms and times and manually delete the reference for a couple timeslots.
japerry’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta12
Status: Active » Fixed

Marking fixed in 1.0Beta12, this shouldn't be a problem anymore. With the new 2.x branch and scheduler, this also shouldn't be a problem.

Status: Fixed » Closed (fixed)

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