hi,
i'm using drupal commons, and i need to update the site to 7.x-3.28.
as recommended, i tried the procedure on a dev desktop copy first. luckily, because midway through the update i got this error:

Error messagePDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.default_state' in 'field list': SELECT base.id AS id, base.name AS name, base.label AS label, base.weight AS weight, base.locked AS locked, base.default_state AS default_state, base.data AS data, base.status AS status, base.module AS module FROM {registration_type} base; Array ( ) in EntityAPIController->query() (line 187 of C:\Users\8i8\Sites\commons-testing2\profiles\commons\modules\contrib\entity\includes\entity.controller.inc

any idea what's wrong?

and even though i made a backup with backup and migrate module, i don't understand how i can restore the site because i can't load any page now. (but perhaps that question should be in a separate thread?)...
thank you,
d

Comments

cafuego’s picture

I'm hitting the same problem. It looks like the entity module is trying to load information about the registration entity using its updated controller code without first having run the registration_update_7106() that adds a new field. This causes the generated EntityAPI query to fail.

That's a problem with the registration module, not Commons. See #2468549: broke my drush? Column not found 'base.default_state' in 'field list'. I've re-opened that issue, because it's impossible to actually run db updates via drush OR update.php after you pop the 7.x-1.4 code on disk - it errors out as above.

Manually adding the database column as described in the related issue works around the problem and brings your commons site back by running updates.

Doronro’s picture

thanks for the input..
does this mean that doing a "standard" update (as described at https://docs.acquia.com/commons/upgrade#animated ) is not possible at this point in time?
i am not comfortable with code. is there any way to work around this using UI?

cafuego’s picture

To the best of my knowledge, there's no way to do a normal upgrade currently.

If your commons site is hosted on Acquia, you could login via ssh and use drush to run the SQL command. I'm pretty sure Acquia do not provide a UI to MySQL.

lsolesen’s picture

This is a problem with the Redirect module. What I did was reverting the schema number for the redirect module to 7100.

Go to MySQL.
Go to the system table.
Search for 'redirect' in name.
Change the schema version to 7100
Run database upgrades /upgrade.php or 'drush dbup'

Doronro’s picture

is this a better fix than adding a column to the registration module table?

cafuego’s picture

@lsolesen: Since the error is definitely a schema problem in registration, that suggests a possible fix is to modify redirect module to only run *its* update once registration is done. Hmm.

@Doronro: Much of a muchness, both involve making database changes directly so that udpate.php can complete successfully.