Try to re-download Rules module and re-try again. So basically remove Rules folder and re-download it again manually or use drush
command, e.g.:
drush -y dl rules
For 2.x-dev version, add --dev
.
After that clear you caches. If you're using any external caching such as Memcached or Redis, clear it as well. Then re-try again
Source: Error at time of installation of Call to undefined method stdClass::events().
If above won't help, the unserialize()
notice suggests that your configuration data is corrupted. As per PHP docs:
In case the passed string is not unserializeable, FALSE
is returned and E_NOTICE
is issued.
So basically you need to identify the table of your entity ($this->entityInfo['base table']
/$schema['fields']
) and which row it refers to (fields
column). Ideally by setting up the breakpoint or manual code right after unserialize()
call.
In other words, edit includes/entity.controller.inc
file, find load()
method and modify something like below:
$record->$field = unserialize($record->$field);
if ($record->$field === FALSE) { // Check if field is unserializeable.
var_dump($record->$field, $record, $field); // Or use dpm(), dd(), etc.
// exit(); // Optional exit to improve the formatting.
}
If you've found some certain pattern, find the corrupted row by:
drush sql-dump --ordered-dump | grep some_unique_field_pattern
Then either correct the corrupted serialized data, restore from the backup or remove the corrupted field data.