- Issue created by @dieterholvoet
- π§πͺBelgium dieterholvoet Brussels
It seems like this specific error is only triggered if you rebuild caches before executing update hooks. If you don't, the following warnings and error are logged:
> [warning] Undefined array key "langcode" EntityViewsData.php:334 > [warning] Undefined array key "langcode" EntityViewsData.php:442 > [error] Error: Call to a member function getSchema() on null in Drupal\views\EntityViewsData->mapFieldDefinition() (line 442 of /[..]/web/core/modules/views/src/EntityViewsData.php) > #0 /[..]/web/core/modules/views/src/EntityViewsData.php(334): Drupal\views\EntityViewsData->mapFieldDefinition('easy_email', 'langcode', NULL, Object(Drupal\Core\Entity\Sql\DefaultTableMapping), Array) > #1 /[..]/web/core/modules/views/views.views.inc(180): Drupal\views\EntityViewsData->getViewsData() > #2 /[..]/web/core/modules/views/src/ViewsData.php(228): views_views_data() > #3 /[..]/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(395): Drupal\views\ViewsData->Drupal\views\{closure}(Object(Closure), 'views')
- π§πͺBelgium dieterholvoet Brussels
Adding back the langcode key seems to fix these errors, but only without doing a cache rebuild before running update hooks. Also, a new error appears:
Attempted to create, modify or delete a configurable field of non-configurable field storage key.
I tried both
drush updatedb
anddrush updatedb --no-cache-clear
, both give the same result. I'm going to revert back to version 2 for now. - πΊπΈUnited States zengenuity
These instructions should be in a more prominent location, but here are the steps to do a 2.x to 3.x upgrade: https://www.drupal.org/project/easy_email/releases/3.0.0-beta3 β
- π§πͺBelgium dieterholvoet Brussels
Wouldnβt it make more sense to create another v2 release instead of expecting people to discover this documentation and requiring them to install a dev release?
- πΊπΈUnited States zengenuity
I've added a link to the upgrade instructions on the module home page. It would be helpful if you could try those out and report back if they work for you. I haven't tried them since the 3.0 beta, so it would be good to confirm they still work. I think the only change that needs to be made is that you don't need to specifically run
composer require 'drupal/easy_email:^3.0@beta'
. I think runningcomposer require 'drupal/easy_email:^3.0'
to get the most recent version should be fine.As for creating a new 2.1.x release, I don't want to do that because people might upgrade without reading the release notes, breaking their site in the process. (or at least the email functionality) This upgrade process can only be done manually, so I don't think it's a problem to require people to temporarily install the dev release. I suppose we could create a 2.2.0 specifically for this purpose, but I don't want to clutter the module page with that, and people would still need to specifically require that release, so it's the exact same process to do it with the dev release.
- π§πͺBelgium dieterholvoet Brussels
Just tried updating from
dev-2.2.x 7e69429
to3.0.4
, but it fails on the same error:------------ ----------- --------------- ------------------------------------- Module Update ID Type Description ------------ ----------- --------------- ------------------------------------- easy_email 10001 hook_update_n 10001 - Set the default value for accessing the email log report. easy_email 00005 post-update Re-install new easy_email entity type easy_email 00006 post-update Update the easy email types for the new settings. easy_email 00007 post-update Copy data from temporary table to new easy_email entity type easy_email 00008 post-update Delete the temporary table. easy_email 00009 post-update Set default global settings ------------ ----------- --------------- ------------------------------------- // Do you wish to run the specified pending updates?: yes. > [notice] Update started: easy_email_update_10001 > [notice] Update completed: easy_email_update_10001 > [notice] Update started: easy_email_post_update_00005 > [notice] Update completed: easy_email_post_update_00005 > [notice] Update started: easy_email_post_update_00006 > [notice] Update completed: easy_email_post_update_00006 > [notice] Update started: easy_email_post_update_00007 > [error] Attempted to create, modify or delete a configurable field of non-configurable field storage from_name. > [error] Update failed: easy_email_post_update_00007 [error] Update aborted by: easy_email_post_update_00007 [error] Finished performing updates.
- πΊπΈUnited States zengenuity
Did the
drush updatedb
complete successfully at 2.2.x-dev? One of the things it should have done was deletefrom_name
ineasy_email_post_update_00003()
: https://git.drupalcode.org/project/easy_email/-/blob/2.2.x/easy_email.po... - π§πͺBelgium dieterholvoet Brussels
Okay, it works now. Important to note: if you're deploying your site in an automatic way, through pipelines for example, you have to export and commit configuration changes after running both groups of update hooks.