Just trying to upgrade a site from Drupal 7

Getting this error message; seems the error blocks me from seeing the main content.

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_type' in 'where clause': SELECT t.* FROM {field_data_taxonomy_vocabulary_1} t WHERE (entity_type = :db_condition_placeholder_0) AND (entity_id IN (:db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3)) AND (language IN (:db_condition_placeholder_4)) AND (deleted = :db_condition_placeholder_5) ORDER BY delta ASC; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => 59 [:db_condition_placeholder_2] => 60 [:db_condition_placeholder_3] => 72 [:db_condition_placeholder_4] => und [:db_condition_placeholder_5] => 0 ) in field_sql_storage_field_storage_load() (line 343 of /usr/www/users/hkout/backdrop/core/modules/field/modules/field_sql_storage/field_sql_storage.module).

Looking at the site in Drupal 7, I don't see field_data_taxonomy_vocabulary_1 ; instead there's field_data_taxonomy_vocabulary_2
- not sure if I somehow have key taxonomy - enabling Drupal/Backdrop to determine where to place content - in this table with number 2 in the Drupal site; but when it comes to Backdrop, this taxonomy is in the wrong place?

Comments

klonos's picture

Hello DocMartinHK,

I have not seen this specific problem be reported so far, but a little bit of googling around lead me to https://www.drupal.org/project/drupal/issues/1140746

In that issue there are various comments, some of which mention db update not having finished properly. If you have access to drush, can you please try running `drush updb` and see if there are any pending updates?

In general, can you please read through that issue and see if anything applies to your case?

PS: also, was the site you are upgrading a D7 site which was previously upgraded from D6?

klonos's picture

...from that d.org issue, there is another linked: https://www.drupal.org/project/drupal/issues/1526436

That one seems to be related to the problem you are hitting (I could be wrong though), as it is titled "taxonomy_update_7005() sometimes fails when inserting into field_data_taxonomy_vocabulary_N". There's a proposed patch in that issue, but it is untested, so please take a backup of your database if not done so already, and then try applying it.

In that issue, they mention that the problem is with taxonomy_update_7006, whereas the most recent db update for the D7 core Taxonomy module seems to be taxonomy_update_7011. Before attempting to upgrade to Backdrop, did you make sure that your site was updated to the latest version of D7, and that there were no pending db updates?

Many thanks!

I've never used drush.

Yes, updated from D6, maybe even D5 [I think]; I had found via google that there may be something in this being a sort of legacy issue, with Taxonomy changed since but still able to work in D7.

I had updated the D7 site; just visited, and tried again, with message "no pending updates". And just tried status report, to ensure I did have latest D7!

Here, it seems to me as if the main Taxonomy should be in taxonomy_vocabulary_1, but this doesn't exist and it's instead in taxonomy_vocabulary_2 - which managed to work in D7.
Have ideas for trying to copy the taxonomy_vocabulary_2 table, edit it and try inserting as taxonomy_vocabulary_1.
Not so sure of the fix you found; that mentions duplicate entries.

Another way, maybe simpler for me, is to try creating another Taxonomy; I got as far as doing so, and notice it was not named taxonomy_vocabulary_N but another name used. Perhaps if I do so, would be more "modern" table name, allowing Backdrop to then find the story type content.

After a bit of messing about - I've rarely touched databases:

I did export the field_data_taxonomy_vocabulary_2 table from the Drupal 7 site.

Then, edited the file so all occurrences of vocabulary_2 became vocabulary_1.
{was also a comment where I changed number; think this is trivial]

Then, imported the table to the Backdrop site's MySQL table.
- and, presto!, the site started working; content recognised...

Well, there will be more issues I expect, but a lot better than seeing home page with no content, just error message!

Looked at another site's MySQL table; and there is a vocabulary_1 table; so even though this too was from Drupal 6 [and maybe 5; and mambo, and joomla...], I think it would be ok.
So, bit by bit may continue this move of a few sites from Drupal to Backdrop; maybe write more about experiences, for utter non developers.