Hi, I made the mistake of creating a text field which was too big, and thus met with the consequences of core bug #1052248: Putting in an overly-large value for a Text field's maximum value breaks things rather horribly.

Now I get the following error on every page:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.field_data_field_text' doesn't exist: SELECT field_data_field_text0.entity_type AS entity_type, field_data_field_text0.entity_id AS entity_id, field_data_field_text0.revision_id AS revision_id, field_data_field_text0.bundle AS bundle FROM {field_data_field_text} field_data_field_text0 WHERE (field_data_field_text0.deleted = :db_condition_placeholder_0) AND (field_data_field_text0.bundle = :db_condition_placeholder_1) LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => test_news ) in field_sql_storage_field_storage_query() (line 569 of /home/sdarm/public_html/modules/field/modules/field_sql_storage/field_sql_storage.module).

The field I was trying to create was called "text" - but it never got created. Obviously Drupal thinks it was.

I thought deleting the whole custom content type entry - including that field - would fix the issue. But alas, it has not.

I have duplicated the steps to get to this point on a non-production website. It broke in exactly the same manner with the same error code.

The bug that causes this has been identified in the issue listed above, but nowhere have I found help in fixing the problem that it creates.

Thanks for any info that others can give.

Comments

oznate’s picture

For the sake of those searching the forums, this was the original error message given at the time I created the problem field on a test system using the field name "breaker":

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1074 Column length too big for column 'field_breaker_value' (max = 21845); use BLOB or TEXT instead: CREATE TABLE {field_data_field_breaker} ( `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_breaker_value` VARCHAR(64000) NULL DEFAULT NULL, `field_breaker_format` VARCHAR(255) NULL DEFAULT NULL, 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_breaker_format` (`field_breaker_format`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Data storage for field 23 (field_breaker)'; Array ( ) in db_create_table() (line 2588 of /home/user/public_html/drupal7/includes/database/database.inc).

oznate’s picture

On the issue page (#1052248: Putting in an overly-large value for a Text field's maximum value breaks things rather horribly), comment #7 led me to the solution if you have made a field too large and are now seeing the error messages above.

I went to the MySQL Admin and removed the offending entry from field_config_instance. The entry you are looking for will have the name you gave the field which was too big and which produced the error.

Now Drupal will stop looking for a field that does not exist, and you should stop getting errors.