Can't uninstall

Created on 27 June 2023, over 1 year ago

Problem/Motivation

When trying to uninstall Encrypt, then our site breaks.

Steps to reproduce

Install Encrypt using composer: composer require drupal/encrypt
Uninstall it: composer remove drupal/encrypt

Error is:

El sitio web encontró un error inesperado. Vuelva a intentarlo más tarde.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "encryption_profile" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

Environment:
* Drupal 9.5.8
* PHP 8.1.18
* MySQL 8.0.32

Please I need some advice to properly uninstall and let the site working again.

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

🇺🇾Uruguay lupa18

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

Comments & Activities

  • Issue created by @lupa18
  • 🇺🇸United States rlhawk Seattle, Washington, United States

    There must be some steps missing from your steps to reproduce. Adding, then removing, the module via Composer—without ever installing it—should not cause any issue in Drupal. If it is installed and an encryption profile is created, you will need to remove the encryption profile and uninstall the module before removing the package as a Composer dependency.

  • 🇫🇷France paul_leclerc Lausanne Switzerland

    I've the same issue but in a different context.

    After few weeks on other tickets I'm working again on an encrypt mission that was working great.
    Checking out the branch about the encrypt ticket, when I'm drush cim it's enabling again all the encrypt modules, every commands respond great but the website always shows me :

    Drupal\Component\Plugin\Exception\PluginNotFoundException: The "encryption_profile" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
    Drupal\content_translation\ContentTranslationManager->isSupported('encryption_profile') (Line: 94)
    Drupal\content_translation\ContentTranslationManager->isEnabled('encryption_profile', 'encryption_profile') (Line: 470)
    content_translation_entity_extra_field_info()
    call_user_func_array(Object, Array) (Line: 426)
    Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'content_translation') (Line: 405)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_extra_field_info', Object) (Line: 433)
    Drupal\Core\Extension\ModuleHandler->invokeAll('entity_extra_field_info') (Line: 660)
    Drupal\Core\Entity\EntityFieldManager->getExtraFields('site_setting_entity', 'ino_ss_homepage') (Line: 160)

    If I drush pmu encrypt it's OK but I can't enable it and make the website don't crash on this erreur.

    cli-drupal:/app$ drush edel encryption_profile
     [success] No matching entities found.

    It's certainly a tiny thing I forget to manage but I suppose the contrib should not crash all the website because of that.

  • Status changed to Postponed: needs info about 1 year ago
  • 🇺🇸United States rlhawk Seattle, Washington, United States

    I would really like to help solve this, but I need more information to do so.

  • 🇺🇾Uruguay lupa18

    You are right @rlhawk

    I installed and created a profile and a key (I did it several weeks ago).

    Then I deleted the key and the profile but can't delete this module.

    What else do you need?

  • 🇺🇾Uruguay lupa18

    Hi ! I'm with the same installation, now in Drupal 10 and running the same issue, when trying to uninstall encrypt module, this error appear:

    The website encountered an unexpected error. Try again later.
    
    Drupal\Component\Plugin\Exception\PluginNotFoundException: The "encryption_profile" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
    

    What other information do you need?

  • 🇺🇸United States rlhawk Seattle, Washington, United States

    Here are the steps that I performed to try to reproduce the issue you describe:

    1. Added drupal/key, drupal/encrypt, and drupal/sodium to the project with Composer (using the command line)
    2. Installed Key, Encrypt, and Sodium (using Drupal's UI)
    3. Created an encryption key (using using Drupal's UI)
    4. Created an encryption profile that uses the encryption key and the Sodium encryption method (using Drupal's UI)
    5. Tested that encryption and decryption were successfully performed
    6. Deleted the encryption profile (using Drupal's UI)
    7. Uninstalled Sodium (using Drupal's UI)
    8. Uninstalled Encrypt (using Drupal's UI)

    I did not see the error that you describe. Please list the exact steps that need to be performed to reproduce the error.

Production build 0.71.5 2024