Hi Damien,
Don't know if it's my dev instance which is wrong but just wanted to let you know there is a problem when updating to beta3 with drush :
Code updates will be made to the following projects: Meta tags [metatag-7.x-1.0-beta3]
Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
Project metatag was updated successfully. Installed version is now 7.x-1.0-beta3.
Backups were saved into the directory /home/sly/drush-backups/projectwhite/20121116153751/modules/metatag. [ok]
WD php: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'language' in 'field list': SELECT entity_id, data, language FROM {metatag} WHERE [error]
(entity_type = :type) AND (entity_id IN (:ids_0)); Array
(
[:type] => user
[:ids_0] => 0
)
in metatag_metatags_load_multiple() (line 351 of /home/web/slybud.com/projectwhite/sites/all/modules/contrib/metatag/metatag.module).
Drush command terminated abnormally due to an unrecoverable error. [error]
PDOException : SQLSTATE[42S22]: Column not found: 1054 Unknown column 'language' in 'field list': SELECT entity_id, data, language FROM {metatag} WHERE (entity_type = :type) AND (entity_id IN (:ids_0)); Array
(
[:type] => user
[:ids_0] => 0
)
dans metatag_metatags_load_multiple() (ligne 351 dans /home/web/slybud.com/projectwhite/sites/all/modules/contrib/metatag/metatag.module).Drush was not able to start (bootstrap) Drupal. [error]
Hint: This error can only occur once the database connection has already been successfully initiated, therefore this error generally points to a site configuration
issue, and not a problem connecting to the database.
Drush was attempting to connect to:
Drupal version : 7.17
Site URI : http://default
Database driver : mysql
Database hostname : localhost
Database : Connected
Default theme : projectwhite
Administration theme: seven
PHP configuration : /etc/php5/cli/php.ini
Drush version : 5.8
Drush configuration:
Drupal root : /home/web/slybud.com/projectwhite
Site path : sites/default
Modules path : sites/all/modules
Themes path : sites/all/themes
File directory path: sites/default/files
Temporary file directory path: /tmp
%paths : Array
Backups were restored successfully.
Everything runs smooth when doing a module upgrade the old-fashioned way :
- wget
- tar -xvzf
- drush updb
The following updates are pending:
metatag module :
7003 - Add the {metatag}.language field.
Do you wish to run all pending updates? (y/n): y
Performed update: metatag_update_7003 [ok]
Finished performing updates.
Obviously "chicken or egg problem" with the new column metatag.language
Comments
Comment #1
damienmckennaUgh.
This is happening because "drush upc" clears all caches after it updates the module files. Not sure what can be realistically done, I know other modules have ran into this problem too (Rules, etc) but I don't know if there's a reasonable solution.
Comment #2
damienmckennaClarified the title.
Comment #3
slybud commentedThx, I knew this would be tricky
Maybe it should be mentionned somewhere in the release notes ?
Anyway, it works !!!!
Comment #4
damienmckennaI added a note to the release notes as a reminder to run the database updates: http://drupal.org/node/1842696
Comment #5
fonant commentedCan confirm that downloading code and updating database works. I used drush:
#
cd sites/all/modules#
drush dl metatag#
drush updatedbComment #6
damienmckennaThere are a few solutions for this:
I am sorry about the schema update causing problems for so many people :-(
This patch wraps metatag_entity_load() with a try-catch block that'll display a message if the problem arrises.
Comment #7
damienmckennaA tiny tweak on the patch from #6, this avoids displaying two messages for people running into the error via Drush.
Comment #8
damienmckennaCommitted.
Comment #9
Brian E. Conklin commentedI'm having the same problem, except I don't use drush. When i try to run the update.php script it says there are no pending updates. How can I the database updates run?
Comment #10
damienmckenna@Brian: It is extremely strange that it would say there are no pending database updates but still give an error when trying to load records from the database. Please check the "metatag" table in your database and see if there is a 'language' field.
Comment #11
Brian E. Conklin commented@Damien, there is not a 'language' field in the metatag table. There are only 'entity_type', 'entity_id', and 'data'.
I've tried to update on three sites. Two are dev sites running on my local Windows laptop using IIS. The third is a live site on a CentOS Linux server running Apache. All three had the same exact behavior. No database update required on the update.php script and when going to the I get an error the others were reporting.
Comment #12
damienmckenna@Brian: The next thing to check - please run the following query: SELECT schema_version FROM system WHERE name='metatag'; It should return 7002 if the database updates have not ran yet.
Comment #13
damienmckennaI've released beta4, hopefully all will go well with the new release :)
Comment #14
Brian E. Conklin commented@Damien: I updated to beta4. There was an error when the update.php script runs, but the update appears to have been successful. Attached is a screen shot so you can see the error.
Comment #15
Brian E. Conklin commented@Damien it appears I may spoken too soon. All pages have an error which says "Error loading meta tag data, do the /update.php">database updates need to be ran?" When I attempt to run the update.php script I get the same screen as in the screen shot in my previous post.
The result of the query you asked me to run after upgrading to beta4 is "-1".
I changed that value back to "7002" and reran update.php. This time the page saw there were updates to perform and ran them. The system seems to now be working.
I suspect something funky happened going from beta2 to beta3 and the metatag schema_version got messed up in the process.
All appears to be well now. Thanks for the help!