Cloning this issue from Entity Registration as this is a Calendar module patch that is quoted as fixing the issue.
We recently set up a Calendar month view for registration nodes, displaying the title as a link and number of slots filled out of the maximum seats. Whether in the Views GUI preview or the page itself, if we browse to a month containing a registration node we are greeted with:
"Fatal error: __clone method called on non-object in [...]/sites/all/modules/contrib/calendar/includes/calendar_plugin_row.inc on line 381"
The line in question:
$entity = clone($this->entities[$id]);
The error is being generated by calendar module, but I believe it's being caused by registration module. The error only appears when we try to include Registration Settings: Slots Used (capacity_used) in the calendar output. calendar_plugin_row::render() needs to clone() the entity, but $row->nid is not set when this field is used. I cannot grok what's happening in registration_views_views_data_alter() and registration_handler_field_entity_capacity_used::render() clearly enough to tell where the problem is.
Has anyone else encountered this or have any idea of what might be up?
Edit: Updated patch with additional testing on the entity object.
Comment | File | Size | Author |
---|---|---|---|
#3 | calendar-assign-id-with-field-data-2883537-3.patch | 1.06 KB | drewfranz |
#2 | calendar-assign-id-with-field-data-2883537-1.patch | 652 bytes | drewfranz |
Comments
Comment #2
drewfranz CreditAttribution: drewfranz commentedComment #3
drewfranz CreditAttribution: drewfranz commentedComment #4
apadernoComment #5
Neslee Canil Pinto