Cannot uninstall module cause field always_in_stock is present, but can't remove it

Created on 4 November 2019, about 5 years ago
Updated 16 September 2024, about 2 months ago

Hello,

I cannot uninstall the commerce_stock module, it says that I cannot uninstall it because some fields are still present (always_in_stock). When when I go to my product variation type, I can see the always_in_stock field in manage form display page, but not on manage fields (so I can't remove it).

So the installation is stuck and I cannot uninstall the module. See attached screenshot.

Best regards, still looking for a manual solution to properly uninstall the module

πŸ’¬ Support request
Status

Closed: works as designed

Component

Code

Created by

πŸ‡«πŸ‡·France Alexandre360

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΏπŸ‡¦South Africa niki v

    I have the same issue, attempting to remove field values gives "The website encountered an unexpected error. Please try again later." wsod although it doesn't break the site.

    log message is
    Error: Call to undefined method Drupal\Core\Config\Entity\ConfigEntityType::isSubclassOf() in Drupal\commerce_stock_local\Form\PrepareUninstallForm->submitForm() (line 90 of C:\wamp64\www\D10ck\kickstart\web\modules\contrib\commerce_stock\modules\local_storage\src\Form\PrepareUninstallForm.php)

    Is this a core problem or some other conflict?

    I'm using Commerce Kickstart 3 locally, product imports are failing and I was testing to see whether the stock module is implicated.

  • πŸ‡·πŸ‡ΊRussia andrey.troeglazov

    I have faced the same issue, attaching the patch to fix.

  • πŸ‡·πŸ‡ΈSerbia darko_antunovic

    @andrey.troeglazov

    I can confirm that the patch works for me. I am using commerce_stock:1.3 , drupal 10.2.2 with PHP 8.1.17

  • isSubclassOf() is deprecated as of Drupal 10. This patch works, and there is also a merge request over on https://www.drupal.org/project/commerce_stock/issues/3416637 πŸ› Can't uninstall - WSOD - commerce_stock_always_in_stock field values don't delete Needs review

Production build 0.71.5 2024