EBT Settings field prevents uninstall of ebt_core

Created on 19 February 2023, over 1 year ago
Updated 2 April 2023, over 1 year ago

I am unable to uninstall ebt_core. It reports:

The following reason prevents Extra Block Types (EBT): Core from being uninstalled:
The EBT Settings field type is used in the following field: block_content.field_ebt_settings

/admin/reports/fields reports that block_content.field_ebt_settings is not being used.

To repeat install ebt_core on fresh D9 install. Navigate to /admin/modules/uninstall and observe warning above.

Steps to reproduce

  1. Run composer require 'drupal/ebt_core:^1.4'
  2. Run drush en ebt_core -y
  3. Run drush pmu ebt_core -y
  4. Result: ebt_core: The <em class="placeholder">EBT Settings</em> field type is used in the following field: block_content.field_ebt_settings
πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Dave Kopecek

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

Comments & Activities

  • Issue created by @Dave Kopecek
  • πŸ‡¦πŸ‡²Armenia levmyshkin Yerevan, Armenia

    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/ebt

    If you have any questions feel free to write it here or create new issue on drupal.org. Thank you, for using EBT modules!

  • πŸ‡¦πŸ‡²Armenia levmyshkin Yerevan, Armenia
  • πŸ‡ΊπŸ‡Έ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?

  • πŸ‡¦πŸ‡²Armenia levmyshkin Yerevan, Armenia

    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?

  • πŸ‡¦πŸ‡²Armenia levmyshkin Yerevan, Armenia
  • πŸ‡§πŸ‡·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

  • πŸ‡§πŸ‡·Brazil RenatoG Campinas
Production build 0.69.0 2024