- Issue created by @londova
Same problem. Once you uninstall, and you visit the variation page where the trait was turned on, you get this error.
[The first time I tried it, it actally came up but the trait was still shown with the value grayed out, even though the module was no longer there. Second time I installed/uninstalled got this error. ]
I tried
- drush cache clear,
- truncating the DB table "cache_recovery" (this is rebuilt after cache_clear),
but problem still exists.This commerce module had a similar problem, and somebody wrote a long hook_uninstall patch, that checks and clears the traits.
https://www.drupal.org/files/issues/2906694-uninstall-traits-5.patch →
I have not tried doing something like this, but this module may need something similar.For us, we decided not to install this module on production, but write a custom solution.
I found a temporary workaround, until this is fixed for real.
The trait is recorded in the config for the product_variation (but never flushed upon uninstall)
The steps are:
1) export single config (for example using the config-export interface)
2) edit it,
3) re-import it.Here is the config for the product_variation that has the trait, this is left after uninstall:
traits:
- maximum_order_quantity
...
.... [ it may have more, depending how you configured it, in our case we only had maximum ]Here is what the line should read after you edit it, assuming there are no other traits from some other module that you need:
traits: { }After the re-import the system works normally again.
The real solution would be to flush the config upon uninstall in hook_uninstall