I get the following error upon comment deletion:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision_id' in 'field list': SELECT entity_id, revision_id, language, data FROM {metatag} WHERE (entity_type = :type) AND (entity_id IN (:ids_0)) ORDER BY entity_id, revision_id; Array ( [:type] => comment [:ids_0] => 484 ) in metatag_metatags_load_multiple() (Zeile 373 von XXXXXX/www/drupal/sites/all/modules/metatag/metatag.module).
I've updated from some dev after beta7. After performing the update (i.e. running update.php) I was greeted with mutliple messages like these:
Error loading meta tag data, do the database updates need to be run? The error occurred when loading record(s) 6 for the taxonomy_term entity type. The error message was: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision_id' in 'field list'
Error loading meta tag data, do the database updates need to be run? The error occurred when loading record(s) 763 for the file entity type. The error message was: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision_id' in 'field list'
and similar errors.
Rerunning update.php, reuploading the module didn't help. Need any additional info?
Comment | File | Size | Author |
---|---|---|---|
#28 | metatag-n2177455-28.patch | 1.63 KB | DamienMcKenna |
Comments
Comment #1
DamienMcKennaBummer. First off, lets make this a Major issue.
What is the first Metatag update it says needs to be ran?
Comment #2
DamienMcKennaBTW are you sure you installed beta9 and not beta8? beta9 came out over the weekend, beta8 came out last Wednesday night.
Comment #3
dddave CreditAttribution: dddave commentedError loading meta tag data, do the database updates need to be run? The error occurred when loading record(s) 67 for the node entity type. The error message was: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision_id' in 'field list'
This is the first error I got.Comment #4
dddave CreditAttribution: dddave commentedFreshly downloaded version of beta9. ;)
Comment #5
DamienMcKennaYes, but what update number does "drush upatedb" or update.php say needs to be ran first?
Comment #6
dddave CreditAttribution: dddave commentedI am sadly not running drush here. Running update.php brought "no pending updates" which is why the error message baffled me.
Comment #7
DamienMcKennaDo you remember what the first update was when you ran them? Alternatively, can you find out the exact version number you were using prior to updating - you are using a source revisioning system like git or svn, right?
Comment #8
dddave CreditAttribution: dddave commentedNot as strictly as I should. Shame on me. This might be the last slap on the head I needed.
It was 7.x-1.0-beta7+25-dev though.
Comment #9
DamienMcKennaAh! That's a huge help - thanks!
Comment #10
akalata CreditAttribution: akalata commentedI've got the same issue, here's what drush status is giving me:
Updated from 7.x-1.0-beta7 to -beta9.
I tried reverting back to -beta7 and going just to beta8, got the same message.
Comment #11
hass CreditAttribution: hass commentedSame error here when upgrading beta7 to beta9 via drush. The db updates are running after the error.
Comment #12
edenb CreditAttribution: edenb commentedsubscribe
On my site, I get the message:
And here are errors form the dblog:
TYPE metatag
DATE Sunday, February 23, 2014 - 23:13
USER admin
LOCATION http://www.MYSite.com/
REFERRER
MESSAGE Error loading meta tag data, do the database updates need to be run? The error occurred when loading record(s) 24 for the node entity type. The error message was: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision_id' in 'field list'
SEVERITY critical
TYPE metatag
DATE Sunday, February 23, 2014 - 23:13
USER admin
LOCATION http://www.MYSite.com/
REFERRER
MESSAGE Error loading meta tag data, do the database updates need to be run? The error occurred when loading record(s) 31, 46, 52 for the node entity type. The error message was: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision_id' in 'field list'
SEVERITY critical
Comment #13
greatdane CreditAttribution: greatdane commentedUpgraded the metatag module to version metatag-7.x-1.0-beta9 by doing it from the admin/modules/upgrade page. The initial try which resulted in the same error message shown above, i.e,
"WD metatag: Error loading meta tag data, do the database updates need[error]
to be run? The error occurred when loading record(s) 0 for the user
entity type. The error message was: SQLSTATE[42S22]: Column not
found: 1054 Unknown column 'revision_id' in 'field list'
Run your updates, like drush updb. [status]
WD php: PDOException: SQLSTATE[42S02]: Base table or view not found: [error]
1146 Table 'dogs_dogs.cache_panels' doesn't exist: TRUNCATE
{cache_panels} ; Array() in cache_clear_all() (line 165 of
/home/dogs/public_html/includes/cache.inc).
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dogs_dogs.cache_panels' doesn't exist: TRUNCATE {cache_panels} ; Array
() in cache_clear_all() (line 165 of /home/dogs/public_html/includes/cache.inc).
Drush command terminated abnormally due to an unrecoverable error. [error]
"
was received during a 'drush up' upgrade of our site. It automatically restored back to the the metatag-7.x-1.0-beta7. We then tried to upgrade just the metatag module in the admin/modules/upgrade page and it loaded. After the module loaded it gives the option to update the database. It updated without any errors. Then, the rest of the out of date drupal 7 modules were updated and the the drupal 7 core was updated using drush up. All is working now.
Comment #14
Hanpersand CreditAttribution: Hanpersand commentedHey Damien, I'm sorry to report that I installed Metatags beta9 fresh on Drupal 7.26 and I'm getting the following stuff, too:
I'd really like to replace ye olden Open Graph module with Metatag. It looks so much better. Let me know if I can provide any more info that might help troubleshoot this.
Thanks!
@hanabel
EDITED TO ADD: When I try to run the db updates, Drupal's all, "There are no pending updates."
Comment #15
DamienMcKennaClearly I need to tweak the logic so it stops freaking people out, as the important issue is just that you need to run the database updates after updating the codebase.
Comment #16
Hanpersand CreditAttribution: Hanpersand commentedSorry... that was a big chunk of missing info from me. Apologies! Drupal claims there are no pending updates when I try to run updates.
Comment #17
Hanpersand CreditAttribution: Hanpersand commentedI just disabled it, cleared all caches, and tried to re-enable it with drush en metatag. I don't know
This might need to be its own issue. I got this:
I'm not sure if this is related.
Comment #18
Hanpersand CreditAttribution: Hanpersand commented@jesseves on Twitter said this:
We tried that. Here's what happened:
All the updates are still pending, since it choked on the first one.
Comment #19
davidcsonka CreditAttribution: davidcsonka commentedI ran drush updatedb and it said no updates were needed. Still get Error loading meta tag data, do the database updates need to be run? on every page.
Comment #20
DamienMcKenna@davidcsonka: Did you see any errors when you ran the updates?
Comment #21
davidcsonka CreditAttribution: davidcsonka commentedI got the errors from #14 after running "drush pm-update metatag".
And then, immediately after that, I got the error from #17 after I tried to just disable the module, delete the files, drush pm-download metatag, and then drush pm-enable meta-tag.
Comment #22
DamienMcKennaComment #23
Hanpersand CreditAttribution: Hanpersand commentedBased on Jess Snyder's experiences with this problem (via @jesseves on twitter), I did the following steps:
1. Disabled metatag.
2. Deleted the module folder.
3. Went into phpMyAdmin (local) and changed the db schema in the metatag row of the system table to 2008.
4. Drush dl a fresh copy.
5. Drush en metatag.
6. This time I was prompted to run db updates. Ran them.
7. Got this:
Comment #24
DamienMcKennaOk, the fact that you didn't have the 'language' field tells me that your site was running a very old version of the original Metatags module as that field was added way back in update 7003, in 2011.
Out of interest, do you have any records in the {metatag} table?
Comment #25
DamienMcKennaLets move all issues related to upgrading from the now defunct "Metatags" module to #2221181: Correctly handle upgrades from Metatags module, including @hanpersand's problems.
Comment #26
Hanpersand CreditAttribution: Hanpersand commentedAh, that means that we installed it when we initially built the site, but then disabled it and never used it. I remember it wasn't doing what we needed at the time, but I didn't remember that we'd ever installed it at all. I'll move my issues over to the other thread and I'll try to get table records for you when I can. Thanks, Damien.
Comment #27
akalata CreditAttribution: akalata commentedFor me, the updating issue (from -beta7 to -beta9) was happening because my schema_version was set to -1. Not sure how that happened, but manually setting schema_version to 7014 (which is what it was at -beta7) and running updates from there worked great!
Comment #28
DamienMcKennaThis should help in some cases - it'll stop the warning messages about the revision_id value not being present, giving time to run the updates.
Comment #30
DamienMcKennaComment #32
DamienMcKennaCould someone please give the above patch a try? I'm *this* close to releasing 1.0-RC1, but I want to ensure this bug is fixed first. Thanks.
Comment #33
dddave CreditAttribution: dddave commentedSorry, I messed up my db and I am to lazy to fix it. The patch applied cleanly, updates ran without an issue but because I ran it on the old install where the first fail happened I got
DatabaseSchemaObjectExistsException: Die Datenbanktabelle <em class="placeholder">metatag_config</em> ist bereits vorhanden. in DatabaseSchema->createTable() (Zeile 657 XXXXXXXXXXXXX/drupal/includes/database/schema.inc).
(table already exists).Comment #34
DamienMcKennaCommitted. Hopefully that'll make the update process for others.
Comment #36
Nebel54I did just try to update from beta7 to the latest commit, updates ran without problems. I did a quick check if existing metatags are still present in existing nodes after the update. Everything looks good so far. Thanks a lot!
Comment #37
DamienMcKenna@Nebel54: Excellent! Thanks for testing it out!