When updating from RC2 to RC3 the site breaks

Created on 4 July 2023, over 1 year ago
Updated 15 December 2023, about 1 year ago

Problem/Motivation

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()

Steps to reproduce

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

Proposed resolution

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.

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jcmartinez Raleigh, NC, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • 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.

Production build 0.71.5 2024