Active
Project:
Entity Relationships
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
2 Mar 2011 at 04:11 UTC
Updated:
9 Jun 2015 at 03:33 UTC
Jump to comment: Most recent
Class name must be a valid object or a string in /home/andy/d7sandbox/drupal/includes/common.inc on line 7394
(may be specifically when trying to enable er and er_ui at once; looks like er is enabled, er_ui is not. Attempting to enable er_ui again works.)
Comments
Comment #1
usonian commentedComment #2
usonian commentedCaused by bad schema definition
Comment #4
e5sego commentedI run into this error again with the fixed version (double-checked fixes from http://drupalcode.org/project/er.git/commitdiff/9dbdb8e348d1d53698effd41... are in). Same error-massage as above, and no er_* tables found in database.
Drupal 7 running on php 5.2.17 and mysql 5.0.32
Comment #5
soyarma commentedLatest dev still has this issue
Comment #6
soyarma commentedIt does appear to be a bad schema def. The tables are not created. Going to try to fix it and hope I get it right.
Comment #7
robloachI tested
er_schema()on another module, and the tables were created. I see both er_definition and er_role tables... Would it be the hook_entity_info() definition?Comment #8
webankit commentedPDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'unitinga_spicdemo.er_definition' doesn't exist: SELECT base.did AS did, base.machine_name AS machine_name, base.name AS name, base.description AS description, base.party_from_type AS party_from_type, base.party_to_type AS party_to_type, base.party_from_bundle AS party_from_bundle, base.party_to_bundle AS party_to_bundle, base.party_from_label AS party_from_label, base.party_to_label AS party_to_label, base.party_from_rid AS party_from_rid, base.party_to_rid AS party_to_rid, base.formatter_from AS formatter_from, base.formatter_to AS formatter_to FROM {er_definition} base; Array ( ) in DrupalDefaultEntityController->load() (line 196 of /home2/unitinga/public_html/spicmacay/demo/includes/entity.inc).
Comment #9
acrazyanimal commentedsubscribing - I see this issue as well. Just downloaded the current dev.
Note: I tried enabling the er and er_ui at the same time and got a php class error. Then enabled each one at a time. I cleared caches to get the 'Entity Relationships' section to show up under structure. I was able to configure which entities were er enabled however when just browsing to /admin/structure/er or /admin/structure/er/roles I received the error displayed in the above comment. I'm guessing that the database tables were not installed properly due to the initial error. I disabled both modules and checked the uninstall section, but neither module appears. Trying to re-enable I get the same initial class errors:
Fatal error: Class name must be a valid object or a string in ...../common.inc on line 7508
...
...
- er_definition_load_multiple( $dids = ???, $conditions = ??? ) ../er.module:595
- entity_load( $entity_type = 'er_definition', $ids = array (), $conditions = array (), $reset = ??? ) ../er.module:158
- entity_get_controller( $entity_type = 'er_definition' ) ../common.inc:7475
Variables in local scope (#16)
$class = null
$controllers =&array empty
$entity_type =string 'er_definition' (length=13)
$type_info =null
Not sure if that helps without much more context? Its all I got.
Comment #10
wilco commentedActually, this is caused by a poorly formatted .info file in the module. Remove all the files[] lines. None of those are required, but mostly, the er.theme.inc is assuming its a class and trying to instantiate it as such.