Hello,

I made a big mistake and that was upgrading from Drupal 6 to Drupal 7. I had a Q&A section on my website with D6 and it was running smoothly. After upgrading to D7, when I enable the answer module I get the following error:

DOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'something_drpl4.field_data_field_answer_question' doesn't exist: SELECT COUNT(*) AS expression FROM (SELECT DISTINCT field_data_field_answer_question0.entity_type AS entity_type, field_data_field_answer_question0.entity_id AS entity_id, field_data_field_answer_question0.revision_id AS revision_id, field_data_field_answer_question0.bundle AS bundle, 1 AS expression FROM {field_data_field_answer_question} field_data_field_answer_question0 WHERE (field_data_field_answer_question0.deleted = :db_condition_placeholder_0) LIMIT 1 OFFSET 0) subquery; Array ( [:db_condition_placeholder_0] => 0 ) in field_sql_storage_field_storage_query() (line 577 of /home/something/public_html/example.com/modules/field/modules/field_sql_storage/field_sql_storage.module).

I appreciate if any one can help me to get rid of this error.

Comments

ldotlopez’s picture

You can workaround this bug by renaming the 'Filtered HTML' input format. After installing answers remove/deactivate the newly created 'Filtered HTML' and re-rename yours.

chipcleary’s picture

Status: Active » Fixed

@ldotlopez, thanks for figuring this one out.

While I didn't realize that the filter could cause this problem, it at least has been removed in the current dev version per #1390762: Remove filtered HTML format from export.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

amins’s picture

@ldotlopez I removed the "Filtered HTML" format by visiting /admin/config/content/formats but I am still having the same problem. Any other solution? thanks

P.S. I do not even have access to the modules page after installing Answers. I have to manually remove the Answers folder form modules through FTP

amins’s picture

Additional information:
Schema module shows that following tables are not present in the database.

field_data_field_answer_question
field_revision_field_answer_question
field_data_field_answer_count
field_revision_field_answer_count

How can I add the following tables with their columns in the database while I do not know what columns each table contains.

Thanks

chipcleary’s picture

Unfortunately, there is no upgrade utility to go from D6 Answers to D7 answers.

To find out what those tables include, you could install D7 Answers in a fresh drupal installation ... but simply adding them to the schema won't get you very far. They track how answers are linked to questions ... and I believe the module would choke if they are simply empty.

I have added a feature request to make an export-import utility that could be used for upgrading sites,, among other things.

#1624924: Create export-import utility that can be used to upgrade from D6 to D7

amins’s picture

@chipcleary, thanks, just for clarification purpose, after installing D7 Answers, you mean I should export the tables related to answers module to my current database using PhpMyAdmin?

chipcleary’s picture

Unfortunately, this is not what I meant. It's not so simple. I meant that there is currently no simple automated way currently to move the D6 data to D7. Hence, the feature request.