Unable to do anything (drush cr, updb) after updating to 5b18190d

Created on 3 May 2023, about 1 year ago
Updated 25 May 2023, about 1 year ago

Hi there.

In the latest dev, the dependency on the recurring_period module is removed. Unfortunately, it's not done in a way that lets upgrades work however. Immediately after doing a composer update, you are unable to clear caches or run updb because the recurring_period plugin doesn't exist anymore.

The dependency on the module should be re-added for now, giving people time to update before removing it.

After manually doing composer require drupal/recurring_period in my project, I was able to run the updates but was still not able to remove the module afterwards without getting errors:

Unable to determine class for field type 'commerce_plugin_item:recurring_period' found in the 'field.field.commerce_product_variation.license.license_expiration' configuration

In the database, I can still see a mention of commerce_plugin_item:recurring_period in the key_value table, in the row with name = commerce_product_variation.field_storage_definitions and collection = entity.definitions.installed.

I tried a config export patch and import but it doesn't seem to make a difference (just seeking for a quick solution; I know an upgrade hook is what's really needed).

diff --git a/config/sync/field.field.commerce_product_variation.license.license_expiration.yml b/config/sync/field.field.commerce_product_variation.license.license_expiration.yml
index daf5c140..ee10d7b7 100644
--- a/config/sync/field.field.commerce_product_variation.license.license_expiration.yml
+++ b/config/sync/field.field.commerce_product_variation.license.license_expiration.yml
@@ -19,4 +19,4 @@ default_value:
   target_plugin_id: unlimited
 default_value_callback: null
 settings: {  }
-field_type: 'commerce_plugin_item:recurring_period'
+field_type: 'commerce_plugin_item:commerce_license_period'
diff --git a/config/sync/field.storage.commerce_product_variation.license_expiration.yml b/config/sync/field.storage.commerce_product_variation.license_expiration.yml
index 926424d9..97f6acbe 100644
--- a/config/sync/field.storage.commerce_product_variation.license_expiration.yml
+++ b/config/sync/field.storage.commerce_product_variation.license_expiration.yml
@@ -8,7 +8,7 @@ dependencies:
 id: commerce_product_variation.license_expiration
 field_name: license_expiration
 entity_type: commerce_product_variation
-type: 'commerce_plugin_item:recurring_period'
+type: 'commerce_plugin_item:commerce_license_period'
 settings: {  }
 module: commerce
 locked: true
πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia Nigel Cunningham Geelong

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

Comments & Activities

Production build 0.69.0 2024