Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I applied the following patches:
"No menu item": "https://www.drupal.org/files/issues/2885418-5.commerce_license.No-menu-item-for-licence-admin.patch",
"Role Configuration form": "https://www.drupal.org/files/issues/2886820-2.commerce_license.add-configuration-form-and-bundle-fields-to-Role-license-type-plugin.patch",
"License creation/destruction logic in sync with cart/order lifecycle": "https://www.drupal.org/files/issues/2879263-7.commerce_license.License-creationdestruction-logic.patch"
I wanted to uninstall the module and I get:
Unable to determine class for field type 'commerce_plugin_item:commerce_license_type' found in the
'field.storage.commerce_product_variation.license_type' configuration
I don't know if this is an issue with commerce_license or elsewhere, but if anyone has any ideas I'd appreciate it. If I install the module everything goes back to working - uninstall it and everything is broken.
Comments
Comment #2
chrisrockwell CreditAttribution: chrisrockwell commentedMoving to bug report. As I learn more about D8 I think the issue is that maybe we need an
@FieldWidget
with idcommerce_license_type
.Comment #3
chrisrockwell CreditAttribution: chrisrockwell commentedI was able to get the site back up by deleting the license_type entries from the
config_snapshot
andconfig
tables. But now when I go to edit a variation type I receive:Drupal\Component\Plugin\Exception\PluginNotFoundException: The "commerce_license" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 52 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
So even though commerce_license is uninstalled
getDefinition
is trying to do get it.Comment #4
chrisrockwell CreditAttribution: chrisrockwell commentedSo the issue is when you uninstall this module but there are product variation types with
Provides a license
checked.Should the module block uninstallation?
Comment #5
joachim CreditAttribution: joachim at Torchbox commentedI think this is a bug in Commerce's Entity Traits framework.
An entity trait that is applied to a bundle entity should cause that bundle entity to have a config dependency on the module that provides the traits.
So in this case, your product variation type uses the license trait. Your product variation type should have a dependency on the CommLi module which would then mean that uninstalling the CommLi module would cause your product variation type to be deleted -- or uninstalling would be prevented if you had product variation entities of that type.
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedWe fixed this in the Entity APi version of bundle plugin, which got committed yesterday.
See BundlePluginUninstallValidator.
Closing this issue as a duplicate of #2909973: Update Commerce for Entity API 8.x-1.0-beta1.