Hi all,
sorry to bother again on the matter, but could really not get through it this time.
I recently updated i18n, Token and Variables modules on my D7.x installation.

Result is a broken homepage with this error:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision.vuuid' in 'field list': SELECT revision.vid AS vid, base.uid AS uid, revision.title AS title, revision.log AS log, revision.status AS status, revision.comment AS comment, revision.promote AS promote, revision.sticky AS sticky, revision.vuuid AS vuuid, base.nid AS nid, base.type AS type, base.language AS language, base.created AS created, base.changed AS changed, base.tnid AS tnid, base.translate AS translate, base.uuid AS uuid, revision.timestamp AS revision_timestamp, revision.uid AS revision_uid FROM {node} base INNER JOIN {node_revision} revision ON revision.vid = base.vid WHERE (base.nid IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4)) ; Array ( [:db_condition_placeholder_0] => 491 [:db_condition_placeholder_1] => 488 [:db_condition_placeholder_2] => 486 [:db_condition_placeholder_3] => 479 [:db_condition_placeholder_4] => 485 ) in DrupalDefaultEntityController->load() (line 196 of /home/www/html/drupal-7.0/includes/entity.inc).

Some of the admin tools work but if I try to access the content menu on the admin section I get this error:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision.vuuid' in 'field list': SELECT revision.vid AS vid, base.uid AS uid, revision.title AS title, revision.log AS log, revision.status AS status, revision.comment AS comment, revision.promote AS promote, revision.sticky AS sticky, revision.vuuid AS vuuid, base.nid AS nid, base.type AS type, base.language AS language, base.created AS created, base.changed AS changed, base.tnid AS tnid, base.translate AS translate, base.uuid AS uuid, revision.timestamp AS revision_timestamp, revision.uid AS revision_uid FROM {node} base INNER JOIN {node_revision} revision ON revision.vid = base.vid WHERE (base.nid IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7, :db_condition_placeholder_8, :db_condition_placeholder_9, :db_condition_placeholder_10, :db_condition_placeholder_11, :db_condition_placeholder_12, :db_condition_placeholder_13, :db_condition_placeholder_14, :db_condition_placeholder_15, :db_condition_placeholder_16, :db_condition_placeholder_17, :db_condition_placeholder_18, :db_condition_placeholder_19, :db_condition_placeholder_20, :db_condition_placeholder_21, :db_condition_placeholder_22, :db_condition_placeholder_23, :db_condition_placeholder_24, :db_condition_placeholder_25, :db_condition_placeholder_26, :db_condition_placeholder_27, :db_condition_placeholder_28, :db_condition_placeholder_29, :db_condition_placeholder_30, :db_condition_placeholder_31, :db_condition_placeholder_32, :db_condition_placeholder_33, :db_condition_placeholder_34, :db_condition_placeholder_35, :db_condition_placeholder_36, :db_condition_placeholder_37, :db_condition_placeholder_38, :db_condition_placeholder_39, :db_condition_placeholder_40, :db_condition_placeholder_41, :db_condition_placeholder_42, :db_condition_placeholder_43, :db_condition_placeholder_44, :db_condition_placeholder_45, :db_condition_placeholder_46, :db_condition_placeholder_47, :db_condition_placeholder_48, :db_condition_placeholder_49)) ; Array ( [:db_condition_placeholder_0] => 493 [:db_condition_placeholder_1] => 491 [:db_condition_placeholder_2] => 492 [:db_condition_placeholder_3] => 490 [:db_condition_placeholder_4] => 489 [:db_condition_placeholder_5] => 488 [:db_condition_placeholder_6] => 487 [:db_condition_placeholder_7] => 486 [:db_condition_placeholder_8] => 485 [:db_condition_placeholder_9] => 484 [:db_condition_placeholder_10] => 483 [:db_condition_placeholder_11] => 482 [:db_condition_placeholder_12] => 449 [:db_condition_placeholder_13] => 410 [:db_condition_placeholder_14] => 441 [:db_condition_placeholder_15] => 214 [:db_condition_placeholder_16] => 321 [:db_condition_placeholder_17] => 322 [:db_condition_placeholder_18] => 434 [:db_condition_placeholder_19] => 334 [:db_condition_placeholder_20] => 219 [:db_condition_placeholder_21] => 463 [:db_condition_placeholder_22] => 433 [:db_condition_placeholder_23] => 436 [:db_condition_placeholder_24] => 481 [:db_condition_placeholder_25] => 480 [:db_condition_placeholder_26] => 479 [:db_condition_placeholder_27] => 444 [:db_condition_placeholder_28] => 447 [:db_condition_placeholder_29] => 448 [:db_condition_placeholder_30] => 451 [:db_condition_placeholder_31] => 452 [:db_condition_placeholder_32] => 453 [:db_condition_placeholder_33] => 454 [:db_condition_placeholder_34] => 455 [:db_condition_placeholder_35] => 456 [:db_condition_placeholder_36] => 457 [:db_condition_placeholder_37] => 458 [:db_condition_placeholder_38] => 459 [:db_condition_placeholder_39] => 460 [:db_condition_placeholder_40] => 461 [:db_condition_placeholder_41] => 462 [:db_condition_placeholder_42] => 464 [:db_condition_placeholder_43] => 475 [:db_condition_placeholder_44] => 474 [:db_condition_placeholder_45] => 473 [:db_condition_placeholder_46] => 472 [:db_condition_placeholder_47] => 471 [:db_condition_placeholder_48] => 470 [:db_condition_placeholder_49] => 469 ) in DrupalDefaultEntityController->load() (line 196 of /home/www/html/drupal-7.0/includes/entity.inc).

I could not find anyone with similar troubles in the issues list of each of the updated modules.

Any tip towards the right direction pretty please?
Thanks a lot,
Andrea

Comments

lomo’s picture

If tables are missing, and there's no "issue" about these error messages, that points to a likelihood that these tables should have been created when you ran update.php, after adding the new versions of the modules. Most of the time there really is nothing that happens when you run update.php, but other times there are schema changes (changes to database tables) associated with the module updates and just adding the new version of the module doesn't automatically run the script that modifies the database structure -- that happens when you run update.php. ;-)

Hope that gets you sorted,

Lowell

See you at the Drupalcon!

FreeFox’s picture

Hi,
There must be something else ... I get these errors too and it seems there are more columns "missing". I had the error with Column not found: 1054 Unknown column 'revision.vuuid' and another with Column not found: 1054 Unknown column 'base.uuid'. I ran update several times but ... problems stay.
-----
Now I got it to work again. I don't know what exactly it was but here is what I did:

I started PHPMyAdmin and did a search on uuid in all tables. There were some cache tables that still had some entries so I deleted all the entries for uuid. After that the error was gone.

3 match(es) inside table cache
2 match(es) inside table cache_bootstrap
2 match(es) inside table cache_menu
2 match(es) inside table cache_update
1 match(es) inside table cache_views

Maybe someone is happy right now ....
FreeFox

lomo’s picture

Glad you got your issue sorted, FreeFox.

@andrea : Perhaps your issue is also related to cache tables? In any case, based on what you pasted, I'm curious if you really are still using Drupal 7.0. If so, upgrading to Drupal 7.7 (currently the latest version of Drupal 7) might also improve things. There have been a lot of bugs fixed since Drupal 7 was released, and it's possible that some contrib modules may also rely on you having a more current version of the core.

See you at the Drupalcon!

flippen’s picture

I get the same error message when I upgraded Drupal from 7.4 to 7.8 and ran the update.php. I also tried to delete the uuid from the cache tables, as FreeFox said, but it always coming back again. Are there other tables I have to remove this uuid from?

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision.vuuid' in 'field list': SELECT revision.vid AS vid, base.uid AS uid, revision.title AS title, revision.log AS log, revision.status AS status, revision.comment AS comment, revision.promote AS promote, revision.sticky AS sticky, revision.vuuid AS vuuid, base.nid AS nid, base.type AS type, base.language AS language, base.created AS created, base.changed AS changed, base.tnid AS tnid, base.translate AS translate, base.uuid AS uuid, revision.timestamp AS revision_timestamp, revision.uid AS revision_uid FROM {node} base INNER JOIN {node_revision} revision ON revision.vid = base.vid WHERE (base.nid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 6 ) i DrupalDefaultEntityController->load() (rad 196 av /home/vhome/...
TribalMan’s picture

I get the following error running a drush update

Drush command terminated abnormally due to an unrecoverable error.   [error]
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision.vuuid' in 'field list': SELECT revision.vid AS vid, base.uid AS uid, revision.title AS title, revision.log AS log, revision.status AS status, revision.comment AS comment, revision.promote AS promote, revision.sticky AS sticky, revision.vuuid AS vuuid, base.nid AS nid, base.type AS type, base.language AS language, base.created AS created, base.changed AS changed, base.tnid AS tnid, base.translate AS translate, base.uuid AS uuid, revision.timestamp AS revision_timestamp, revision.uid AS revision_uid
FROM 
{node} base
INNER JOIN {node_revision} revision ON revision.vid = base.vid
WHERE  (base.nid IN  (:db_condition_placeholder_0)) ; Array
(
    [:db_condition_placeholder_0] => 19
)
 in DrupalDefaultEntityController->load() (line 196 of /home/username/public_html/includes/entity.inc).

I ran update.php manually again, but this did not fix the problem.

jox’s picture

I had the same issue as "Posted by girf on September 21, 2011 at 7:40pm": After upgrading to Drupal 7.8 the "Unknown column 'revision.vuuid'" would break the whole site.

Clearing the caches manually as described above wouldn't help. Also downgrading Drupal back to 7.4 didn't help.

What now helped was the following:

I manually created 4 uuid fields in the database schema (using phpmyadmin):

  • node_revision.vuuid
  • node.uuid
  • file_managed.uuid
  • users.uuid

I made them VARCHAR(36), not null, default "" and description "The Universally Unique Identifier." as defined in
'sites/all/modules/uuid/uuid.schema.inc'.

Now the site is running again (also with Drupal 7.8). Not sure if this entirely and cleanly solves the problem.

Maybe I should mention that I updated the uuid module from 7.x-1.0-alpha1 to 7.x-1.0-alpha2 before upgrading Drupal from 7.4 to 7.8. I was updating several modules and while doing this and I had some errors while running update.php (some 'undefined property' and 'is not an array' kind of errors (maybe 10 to 15 of them), don't remember exactly, unfortunately didn't protocol them). Running update.php again (after the errors) showed that the updates were installed (maybe not cleanly?).

Also I can not really connect the issue to a specific module update step. It suddenly appeared and going back in history step by step didn't revert it.

TribalMan’s picture

I believe this is the same problem I'm experiencing. How many columns did you create for each table?

dmartinc’s picture

What worked for me was to uninstall the UUID module and then clear the caches.
For this:
- Deactivate the uuid module(s). If you cannot go to the list of modules, go to your database with phpmyadmin or similar, and deactivate the all the uuid.something modules by going to the "system" table and changing the column "status" from 1 to 0.
- Uninstall the modules by going to admin/modules/uninstall
- Clear the caches by going to admin/config/development/performance (only after removing the uuid module)
You may need to manually delete or move the "uuid" folder from your "modules" folder as well. I did it during my debugging but I am not sure if it is necessary.

TribalMan’s picture

I got the error after performing an update with drush. I am unable to uninstall (or even get to the module list) "drush dis" does not work either.

jox’s picture

After fixing (?) the issue for my Drupal 7.8 site (see my above comment), it came back now after upgrading to Drupal 7.9. Breaking the whole site.

Unknown column 'base.uuid'

where "base" is pointing to {taxonomy_term_data}.

I thought this time I'd try the reinstall method proposed in dmartinc's comment above.

But this led to all kind of problems requiring me to uninstall and trying to reinstall the uuid module several times while twiddling around in the database schema. Sometimes it would complain about missing uuid fields and sometimes about already existing ones, always changing something, breaking everything again, so I had to start all over again.

Here is the workflow I ended up to fix it reliably (hopefully):

I recommend making a database backup beforehand.

1. disable and uninstall the Uuid module.

I'm using Drush.

> drush dis uuid
> drush pm-uninstall uuid

If there are dependencies, these have to be disabled and uninstalled before of course.

If Drush is not working because of 'Unknown column' errors, then temporarily create any missing columns, one after the other, until uuid (and it's dependencies) can be cleanly disabled and uninstalled.

Examine the error messages to find out which fields have to be created. Several rounds of adding and retrying to install might be neccesary. Note that fields might be named other than 'uuid' (e.g. 'vuuid' in node_revision).

For example (e.g. using phpMyAdmin or MySQL Query Browser):

ALTER TABLE  `users` ADD  `uuid` VARCHAR( 36 ) NOT NULL DEFAULT  '' COMMENT  'The Universally Unique Identifier.';
ALTER TABLE  `file_managed` ADD  `uuid` VARCHAR( 36 ) NOT NULL DEFAULT  '' COMMENT  'The Universally Unique Identifier.';
ALTER TABLE  `node_revision` ADD  `vuuid` VARCHAR( 36 ) NOT NULL DEFAULT  '' COMMENT  'The Universally Unique Identifier.';

2. Clear all caches

> drush cc all

3. Remove ALL 'uuid' columns in the database.

(If you don't do so, it might produce 'column already exist' errors while leaving a half enabled Uuid module. Then you have to start over at step 1.)

A good way to find them all is to export the complete database schema (all tables, without the data) to SQL and make a text search for 'uuid'.

Examples to remove the fields:

ALTER TABLE  `users` DROP  `uuid`;
ALTER TABLE  `file_managed` DROP  `uuid`;
ALTER TABLE  `comment` DROP  `uuid`;
ALTER TABLE  `node` DROP  `uuid`;
ALTER TABLE  `node_revision` DROP  `vuuid`;
ALTER TABLE  `taxonomy_term_data` DROP  `uuid`;

IMPORTANT: really make sure that any uuid field is removed.
If you miss one, you might end up broken again.

3. Re-enable the Uuid module.

> drush en uuid

And call update.php (it wasn't doing anything here, but to be safe).

> drush updatedb

4. Re-enable the dependecies that were uninstalled before, if any.

> drush en whatever
> drush updatedb

Done. I hope this will permanently fix the problem.

I still don't know where this came from. A bug in Uuid, Core, some other module/combination or my installation/configuration?

greg.1.anderson’s picture

See:

http://drupal.org/node/1469942#comment-5698424

Please use the patch in #2; ignore #4 and #6. Had some trouble with the test cases not passing, but I suspect that this was unrelated to this patch. After applying it, I was able to cleanly update uuid. If you are already experiencing this problem, restore your database from backups and run updatedb again after applying the patch.

ressa’s picture

After un-installing the UUID module I got the same error. To fix it I re-enabled the UUID module, and then un-installed it and cleared caches via Drush:

drush @website dis -y uuid
drush @website cc # select all
drush @website pm-uninstall -y uuid
drush @website cc # select all
loopduplicate’s picture

To disable and uninstall 7.x-1.0-alpha5, I used some custom code in an update hook (hook_update_N) which clears the caches after the module is disabled and uninstalled:

/**
 * Disables and Uninstalls the UUID module.
 */
function example_update_7001() {
  if (module_exists('uuid')) {
    module_disable(array('uuid'));
  }
  drupal_uninstall_modules(array('uuid'));
  
  // Clearing the caches is necessary to avoid a sitewide WSOD.
  // See https://www.drupal.org/node/1255550#comment-7933199
  cache_clear_all();
}

Hope this helps someone :)

kristen pol’s picture

Strangely enough, I saw this error today.

What worked:

  • drush rr
  • drush rr (yes, had to run it twice)
  • drush cc all (for good measure)

Back in business after that.

-Kristen
Profile: https://www.linkedin.com/in/kristenpol
Drupal 7 Multilingual Sites: http://kristen.org/book

historysa’s picture

Another option is to change the $conf['memcache_key_prefix'] in your settings file, if using a different database. In my case memcached had database info from a separate database that had been updated to use uuid.