- Issue created by @jcmartinez
- πΊπΈUnited States Dave Kopecek
I got the above error when upgrading 2.0.0-rc1 => 3.0.0. Prior to the upgrade I uninstalled and drupal/recurring_period (1.2.0). Recurring_period was previously blocking the upgrade.
Initially, I tried to update all the way from beta to the latest RC6 but I was getting an error. Then I started updating gradually and I found that the problem comes from the update from RC2 to RC3.
I get the following:
$ drush updb
------------------ ----------- --------------- -------------------------------------------------------------
Module Update ID Type Description
------------------ ----------- --------------- -------------------------------------------------------------
commerce_license 8207 hook_update_n 8207 - Convert recurring_period to commerce_license_period.
------------------ ----------- --------------- -------------------------------------------------------------
Do you wish to run the specified pending updates? (yes/no) [yes]:
>
> [notice] Update started: commerce_license_update_8207
> [warning] Undefined array key "license_expiration" commerce_license.install:144
> [notice] Update completed: commerce_license_update_8207
> [error] TypeError: Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}(): Argument #1 ($definition) must be of type Drupal\Core\Field\FieldStorageDefinitionInterface, null given in Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}() (line 175 of /app/web/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php) #0 [internal function]: Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}(NULL)
> #1 /app/web/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php(177): array_filter(Array, Object(Closure))
> #2 /app/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(381): Drupal\Core\Entity\Sql\DefaultTableMapping::create(Object(Drupal\Core\Entity\ContentEntityType), Array, '')
> #3 /app/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(356): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getCustomTableMapping(Object(Drupal\Core\Entity\ContentEntityType), Array)
> #4 /app/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(203): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getTableMapping()
I'm not very familiar with how this site was set. I'm just trying to update all its modules.
I did the following:
composer update drupal/commerce_license
drush cr
drush updb
I'm not sure is this is something unique to this website or a rare use case.
Everything stats to fail after this message from the update script:
> [warning] Undefined array key "license_expiration" commerce_license.install:144
Any suggestions will be appreciated.
Active
Code
I got the above error when upgrading 2.0.0-rc1 => 3.0.0. Prior to the upgrade I uninstalled and drupal/recurring_period (1.2.0). Recurring_period was previously blocking the upgrade.