1

This question already has an answer here:

In my Drupal site, when I tried to save an article page I'm getting the following error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'novitawe_icpasld.field_revision_field_tags' doesn't exist: DELETE FROM {field_revision_field_tags} WHERE (entity_type = :db_condition_placeholder_0) AND (entity_id = :db_condition_placeholder_1) AND (revision_id = :db_condition_placeholder_2) AND (language IN (:db_condition_placeholder_3)) ; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => 138 [:db_condition_placeholder_2] => 138 [:db_condition_placeholder_3] => und ) in field_sql_storage_field_storage_write() (line 382 of /home7/novitawe/public_html/icpasld/modules/field/modules/field_sql_storage/field_sql_storage.module)

Could anyone please let me know how can I solve this issue without affecting any of my DB because this site is live. .

marked as duplicate by kenorb, Pierre.Vriens, Scott Joudry, Adrian Cid Almaguer, Shawn Conn Feb 4 '16 at 20:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Have you checked your database to see if field_revision_field_tags exists? (Always confirm the error message is accurate.) – Triskelion Mar 2 '13 at 18:28
  • I just check my DB and there no table exist name with "field_revision_field_tags" do you know how to create this table structure ? – FR STAR Mar 2 '13 at 21:43
  • create a taxonomy term reference field with name field_tags – AyeshK Mar 2 '13 at 22:07
  • When you created the 'tags' field, two tables (field_data_field_tags and field_revision_field_tags) were created to hold the information. If the first table is present but the second is not, use a statement like 'CREATE TABLE field_revision_field_tags AS SELECT * FROM field_data_field_tags;' to replace the missing table. If both are missing, then you should restore your database from your latest backup. – Triskelion Mar 2 '13 at 23:39
  • @Ayesh K - If the error is showing, the field has already been created and the database is corrupt. If he tries to recreate the field before trying to recover, he might lose all existing information. Better to begin with the restoration attempt, then move to more drastic measures if restoration is not possible. – Triskelion Mar 2 '13 at 23:45
0

As per @Triskelion comment:

When you created the 'tags' field, two tables (field_data_field_tags and field_revision_field_tags) were created to hold the information. If the first table is present but the second is not, use a statement like CREATE TABLE field_revision_field_tags AS SELECT * FROM field_data_field_tags; to replace the missing table. If both are missing, then you should restore your database from your latest backup.

If the error is showing, the field has already been created and the database is corrupt. If he tries to recreate the field before trying to recover, he might lose all existing information. Better to begin with the restoration attempt, then move to more drastic measures if restoration is not possible.

Not the answer you're looking for? Browse other questions tagged or ask your own question.