I was using an old -dev revision (7a47f87).
Pulled the latest -dev.
Executed drush updatedb correctly.
Trying to edit the field config and saving it gives the following error:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'field_ref_a02_target_type' doesn't exist in table: CREATE TABLE {field_data_field_ref_a02} ( `entity_type` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'The entity type this data is attached to', `bundle` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'The field instance bundle to which this row belongs, used when deleting a field instance', `deleted` TINYINT NOT NULL DEFAULT 0 COMMENT 'A boolean indicating whether this data item has been deleted', `entity_id` INT unsigned NOT NULL COMMENT 'The entity id this data is attached to', `revision_id` INT unsigned NULL DEFAULT NULL COMMENT 'The entity revision id this data is attached to, or NULL if the entity type is not versioned', `language` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'The language for this data item.', `delta` INT unsigned NOT NULL COMMENT 'The sequence number for this data item, used for multi-value fields', `field_ref_a02_target_id` INT unsigned NULL DEFAULT NULL COMMENT 'The id of the target entity', PRIMARY KEY (`entity_type`, `entity_id`, `deleted`, `delta`, `language`), INDEX `entity_type` (`entity_type`), INDEX `bundle` (`bundle`), INDEX `deleted` (`deleted`), INDEX `entity_id` (`entity_id`), INDEX `revision_id` (`revision_id`), INDEX `language` (`language`), INDEX `field_ref_a02_target_entity` (`field_ref_a02_target_type`, `field_ref_a02_target_id`), INDEX `field_ref_a02_target_id` (`field_ref_a02_target_id`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Data storage for field 9 (field_ref_a02)'; Array ( ) in db_create_table() (line 2644 of /.../7.x/includes/database/database.inc).
Trying to access the field config page again gives this other error:
messagePDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd7_entityref.field_data_field_ref_a02' doesn't exist: SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {field_data_field_ref_a02} field_data_field_ref_a020 WHERE (field_data_field_ref_a020.deleted = :db_condition_placeholder_0) LIMIT 1 OFFSET 0) subquery; Array ( [:db_condition_placeholder_0] => 0 ) in field_sql_storage_field_storage_query() (line 568 of /.../7.x/modules/field/modules/field_sql_storage/field_sql_storage.module).
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 1438922-er-tt.patch | 1019 bytes | Pedro Lozano |
| #2 | 1438922-er-tt.patch | 1.23 KB | Pedro Lozano |
Comments
Comment #1
Pedro Lozano commentedFound that this bug is caused by the changes introduced for #1319040: Remove "target_type" column from db.
Upgrades to any version after the first commit for that issue produces this crash.
Comment #2
Pedro Lozano commentedThis patch contains an additional upgrade function to fix these crashes.
Comment #3
Pedro Lozano commentedComment #4
Matthew Davidson commented+1. Works fine for me. Applied the patch, ran the upgrade, re-exported my entityreference-dependent Features without a hitch. Seems to do no harm, and excluding it would be a problem for those of us who've used it when/if there's another entityreference_update_7002().
Comment #5
christianchristensen commented+1 This worked for me as well - applied on a working install, updatedb, and re-export -> installed clean! RTBC
Comment #6
kenianbei commented+1 Works for me as well.
Comment #8
Pedro Lozano commentedRerolling.
Comment #9
chris matthews commentedThe 5 year old patch in #8 to entityreference.install does not apply to the latest 7.x-1.x-dev and if still relevant needs a reroll.