- Issue created by @Dave Kopecek
- π·πΈSerbia levmyshkin Novi Sad, Serbia
Hi Dave Kopecek, EBT modules can't remove content automatically. At least I couldn't find to do it in right way. Because we need to remove Block Type and all blocks for this block types.
If you used any EBT blocks in Layout Builder, you should remove them first from Layout Builder pages and run cron after that. Layout Builder pages will be broken if inline block will be deleted before deleting from Layout Builder pages.I wanted to say you need to remove all EBT blocks and then EBT block types manually, run cron, remove all other EBT modules and then you will be able to remove EBT Core module.
I started to work on EBT blocks documentation:
https://drupalbook.org/ebtIf you have any questions feel free to write it here or create new issue on drupal.org. Thank you, for using EBT modules!
- πΊπΈUnited States Dave Kopecek
>> I wanted to say you need to remove all EBT blocks and then EBT block types manually, run cron, remove all other EBT modules and then you will be able to remove EBT Core module.
This happens on a clean D9 install after just installing ebt_core & no other modules. Once it's installed it can't be uninstalled. No content has been created. EBT_core installs block_content.field_ebt_settings. It shows up in the field list, but not in the block UI.
Where exactly to I remove the block_content.field_ebt_settings? I don't see it listed anywhere. Am I missing something?
- π·πΈSerbia levmyshkin Novi Sad, Serbia
Oh, I see... EBT Core adds only field storage for field_ebt_settings without field instance and there is no way to remove field storage without field instance. Kind of wierd workflow for Drupal, but it's an idea of EBT modules: EBT Core have common settings like field storage and field widget, and other EBT modules have field instances for using EBT settings.
I have two suggestions for you:
1. If you exported configs, then try to remove field.storage.block_content.field_ebt_settings.yml and import configs again without it.
2. Install any other EBT Module, then you will have field instance for field_ebt_settings field storage. And then remove new added EBT block type with field instance for field_ebt_settings. It will cause removing field instance and field storage both.I don't know, should I implement something to remove orphan field storage. I'm having look this solution:
https://www.drupal.org/project/drupal/issues/3231028 β - πΊπΈUnited States w01f
Same problem, decided not to use this module (at least not yet) for a project I was testing it on and not it won't remove. I can see the ebt config files in the single export browser, but is there an easier way to remove these?
- π§π·Brazil renatog Campinas
I was able to reproduce it in a fresh install, only installing and after that uninstalling. So updated the issue summary with a section "steps to reproduce"
I didn't find the final fix yet but I'm putting here the steps just to help
- πΊπΈUnited States peter pulsifer
I struggled with this same issue. I installed EBT but could not install the EBT Starterkit because it requires Drush 12+. So I never added any EBT content. The EBT Core Remove Helper had no effect - it reported correctly that there was no EBT content to delete, and "Remove EBT Settings Field Storage" resulted in no change.
Looking at EbtRemoveHelperForm.php, I see that in my case at least,
$field_storage = \Drupal::entityTypeManager()->getStorage('field_storage_config')->load('field_ebt_settings');
gives no results ($field_storage is null).
What did work is
$field_storages = \Drupal::entityTypeManager()->getStorage('field_storage_config')->loadByProperties(['module' => 'ebt_core']); foreach ($field_storages as $field_storage) $field_storage->delete();
So loading the field storage by module instead of by name was the way to go for me.