Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I downgraded my 5.x-dev version to 5.0-beta10 today and wanted to perform drush updb and I stepped into this.
Drupal\Core\Entity\EntityStorageException: Exception thrown while [error]
performing a schema update. SQLSTATE[42S22]: Column not found: 1054
Unknown column 'webform_open' in 'where clause': SELECT 1 AS
expression
FROM
{node_revision__webform} t
WHERE ( (webform_target_id IS NOT NULL ) OR (webform_default_data IS
NOT NULL ) OR (webform_status IS NOT NULL ) OR (webform_open IS NOT
NULL ) OR (webform_close IS NOT NULL ) )
LIMIT 1 OFFSET 0; Array
(
)
in
Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException()
(line 1478 of
/var/www/vhosts/build/feature-428-webform-update-refactor/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Failed: Drupal\Core\Entity\EntityStorageException: !message in [error]
Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException()
(line 1478 of
/var/www/vhosts/build/feature-428-webform-update-refactor/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Any help would be really nice.
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedYour 'webform' field table is missing the open/close columns. I just tagged a new release which might fix this problem.
Please also check your Status report (/admin/reports/status) which may contain a notification about pending field updates which can be fixed by running `drush entity-updates`
Comment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedFor now, I am marking this as critical.
Comment #4
DiDebruNope update to beta11 didn't fix it but
did the trick :)
Comment #5
matzAB CreditAttribution: matzAB commentedThx @Insasse. That did the trick for me, too ;)
Comment #6
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedI found the root cause of all update issues. Webform beta1 was released with schema version 8074 (webform_update_8074). All updates hooks have been removed before beta2 (see http://cgit.drupalcode.org/webform/commit/?id=72fa6a363c903280b5784a96b9...). None of the update hooks will run on sites which had beta1 installed. It is an ongoing issue with upcoming Webform releases.
Webform could fix by skipping a few update hooks and continue with webform_update_8100 as update hook and try to repair the schema of those sites.
Comment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@webflo Thanks for pinpointing the issue.
I am not up for repairing the schema for sites running beta1 of the webform module. Beta1 installations can backup their config, reinstall the webform module, import the config, and finally run `drush webform-repair`.
At this point, I feel it is more important to focus on stabilizing update hooks for future releases.
Comment #8
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@Matthias (matzAB) I just would like to say "Welcome to the Drupal community".
Comment #9
webflo CreditAttribution: webflo at UEBERBIT GmbH commented@jrockowitz Ok, fair enough. Fixed my site with drush php-eval '\Drupal::keyValue("system.schema")->set("webform", 8000);' to execute all update hooks again. Compared the schema to beta11. Looks good thanks.