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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drewfranz created an issue. See original summary.

drewfranz’s picture

drewfranz’s picture

apaderno’s picture

Version: 7.x-3.5 » 7.x-3.x-dev
Status: Active » Needs review
Neslee Canil Pinto’s picture

Status: Needs review » Closed (cannot reproduce)