Fatal error: Class name must be a valid object or a string in drupal-7.19/includes/common.inc
I am getting this error and I did a backtrace and got the following.
rules_config causes this
rules_config is defined in rules.install
backtrace:
[0] => Array
(
[file] => /var/aegir/platforms/7/servers/drupal-7.19/includes/common.inc
[line] => 7715
[function] => entity_get_controller
[args] => Array
(
[0] => rules_config
)
)
[1] => Array
(
[file] => /var/aegir/platforms/7/modules/all/entity/entity.module
[line] => 159
[function] => entity_load
[args] => Array
(
[0] => rules_config
[1] =>
[2] => Array
(
[plugin] => reaction rule
[active] => 1
)
)
)
[2] => Array
(
[file] => /var/aegir/platforms/7/modules/all/rules/rules.module
[line] => 669
[function] => entity_load_multiple_by_name
[args] => Array
(
[0] => rules_config
[1] =>
[2] => Array
(
[plugin] => reaction rule
[active] => 1
)
)
)
[3] => Array
(
[file] => /var/aegir/platforms/7/modules/all/rules/includes/rules.plugins.inc
[line] => 711
[function] => rules_config_load_multiple
[args] => Array
(
[0] =>
[1] => Array
(
[plugin] => reaction rule
[active] => 1
)
)
)
[4] => Array
(
[file] => /var/aegir/platforms/7/modules/all/rules/rules.module
[line] => 257
[function] => rebuildEventCache
[class] => RulesEventSet
[type] => ::
[args] => Array
(
)
)
Comments
Comment #1
ptmkenny CreditAttribution: ptmkenny commentedPlease provide steps requiring the Rules configuration required to reproduce this error. A backtrace alone is not sufficient to actually begin to fix the problem.
Comment #2
travis uribe CreditAttribution: travis uribe commentedI encountered this issue simply by enabling Rules and Rules UI in the modules screen at /admin/modules
The error is occurring in entity_get_controller() in includes/common.inc at line 7787 in a Drupal 7.21 installation. The issue is that
$type_info['controller class'];
returns a NULL value.I'm confused as to why this is happening, as
rules_entity_info()
clearly defines a controller class for therules_config
entityComment #3
travis uribe CreditAttribution: travis uribe commentedThis is a pretty significant issue, because now that I've encountered the error, my entire website is being killed by it. Every single page produces this fatal error.
Comment #4
travis uribe CreditAttribution: travis uribe commentedIt appears the hook
rules_entity_info()
is not running at all. I inserteddie(__FUNCTION__);
before the return statement therein, and the function is never called. I had to do some hacking to even get to the point where I could disable and uninstall and then reinstall the module in the first place.Comment #5
ptmkenny CreditAttribution: ptmkenny commentedWhich version of Entity API are you running?
Comment #6
travis uribe CreditAttribution: travis uribe commentedEntity API 7.x-1.1
Comment #7
travis uribe CreditAttribution: travis uribe commentedI thought maybe it was a problem of APC caching, as that happens frequently. But I reset it and tried again and got the same issue.
Comment #8
ptmkenny CreditAttribution: ptmkenny commentedComment #8.0
ptmkenny CreditAttribution: ptmkenny commentededited original message to define where rules_config is defined
Comment #9
ragnarkurm CreditAttribution: ragnarkurm commentedJust adding my experience with this issue.
Upgraded rules from 2.3 to 2.6
PHP Fatal error: Unsupported operand types in /.../html/sites/all/modules/rules/rules.module on line 227
vi /.../html/sites/all/modules/rules/rules.module
# $data[$hook] += rules_discover_plugins($discover[$hook]);
drush cc all
Comment #10
pwaterz CreditAttribution: pwaterz commentedI ran into this same issue
I turned rules off
cleared cache
turned rules on
and it went away
Entity API version
7.x-1.0
Comment #11
Alan D. CreditAttribution: Alan D. commentedShame Rules is a dependency on heaps of stuff :/
In my stack, Profile2 was being triggered.
Tried "drush dis profile2", but this threw the same error.
Tried disabling via the db in system table, but that same error stack was being throw
Success with registry_rebuild module (http://www.example.com/sites/all/modules/registry_rebuild/registry_rebui...)
Comment #12
RavindraSingh CreditAttribution: RavindraSingh commentedI have tried to replicate this issue with Drupal 7.32 and rules 7.x-2.8. can't reproduce. please upgrade your core and modules. or add specific steps to replicate.