0

So we have taken over a site and I migrated yamlforms to webforms with yamlform_to_webform module using drush. Now when I do a drush updb I get an error that says:

The SQL storage cannot change the schema for an existing field (field_getintouch in block_content entity) with data.
The following updates are pending:

webform module :
  8007 -   Issue #2840521: Add support for global CSS and JS.
  ... Many updates
  8088 ...

Do you wish to run all pending updates? (y/n): y
The following module is missing from the file system: yamlform_to_webform bootstrap.inc:250                                                                                                    [warning]
Performing webform_update_8007                                                                                                                                                                 [ok]
# THIS IS WHERE IT ALWAYS BREAKS
The SQL storage cannot change the schema for an existing field (field_getintouch in block_content entity) with data.                                                                           [error]
Performing webform_update_8026                                                                                                                                                                 [ok]
Failed: The SQL storage cannot change the schema for an existing field (field_getintouch in block_content entity) with data.

So went ahead and tried drush entity-updates and got this instead.

vagrant@somesite:/srv/www/somesite/web$ drush entity-updates
The following updates are pending:

block_content entity type :
  The block_content.field_getintouch field needs to be updated.
field_collection_item entity type :
  The field_collection_item.field_block_background_color field needs to be updated.
node entity type :
  The node.field_form field needs to be updated.
  The node.field_register_form field needs to be updated.
  The node.webform field needs to be updated.
paragraph entity type :
  The Published field needs to be updated.
  The paragraph.field_block_background_color field needs to be updated.
webform_submission entity type :
  The Webform submission entity type needs to be updated.
Do you wish to run all pending updates? (y/n): y
Drupal\Core\Entity\EntityStorageException: Exception thrown while performing a schema update. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_getintouch_open' in 'where clause':[error]
SELECT 1 AS expression
FROM
{block_content_revision__field_getintouch} t
WHERE (field_getintouch_target_id IS NOT NULL) OR (field_getintouch_default_data IS NOT NULL) OR (field_getintouch_status IS NOT NULL) OR (field_getintouch_open IS NOT NULL) OR
(field_getintouch_close IS NOT NULL)
LIMIT 1 OFFSET 0; Array
(
)
 in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1513 of     /srv/www/somesite/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Failed: Drupal\Core\Entity\EntityStorageException: !message in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1513 of                                          [error]
/srv/www/somesite/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Cache rebuild complete.                                                                                                                                                                        [ok]
Finished performing updates.

Ofcourse I have googled and looked for solutions but getting nowhere. Many have suggested composer update drupal/webform --with-dependencies I've tried that, did not help.

My next idea was to update the tables manually OR delete the data in those fields so it can be updated. But the error message isn't enough verbose for me to know where to search for the correct tables.
I'm on a local machine and I have backed up everything so I can play around and destroy everthing over and over again until I find a rock solid solution.

Any help would be highly appreciated. Let me know if you need additional info, I'll try to post that as soon as possible.

Im currently running 8.4

0

You might need to incrementally do the updates. For example, you would do the initial migration in Drupal 8.2 with last year's first release of the Webform module and then incrementally apply the Webform 8.x-5.x releases.

0

Have succesfully updated entities now by truncating the affected tables, run entity updates and manually imported all forms. I could list all the nodes with forms from the backed up db. Still having issues with reCaptcha though!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.