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

Comments

Alexandre360 created an issue. See original summary.

guy_schneerson’s picture

Did you click the "Remove Field values" on screen1.jpg ?

guy_schneerson’s picture

Status: Active » Postponed (maintainer needs more info)

also, test on the latest dev version

olafkarsten’s picture

Version: 8.x-1.0-alpha3 » 8.x-1.x-dev
Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Closed (outdated)

Closing this due to inactivity

sahilgidwani’s picture

Version: 8.x-1.x-dev » 8.x-1.0-alpha6
Status: Closed (outdated) » Active
sahilgidwani’s picture

@guy_schneerson When I click on "Remove field values" it gives me the following error.

InvalidArgumentException: The controller for URI "" is not callable. in Drupal\Core\Controller\ControllerResolver->getControllerFromDefinition() (line 75 of core/lib/Drupal/Core/Controller/ControllerResolver.php).

sahilgidwani’s picture

Title: Cannot uninstall module cause field always_in_stock is present, but can't removt it » Cannot uninstall module cause field always_in_stock is present, but can't remove it
guy_schneerson’s picture

Category: Bug report » Support request

Just tested and uninstalled with no problems.
This may be an issue with another module you have installed. If you have easy breadcrumbs this may be the issue: https://www.drupal.org/project/easy_breadcrumb/issues/3164758#comment-13...
If not look at other modules you have installed.
Hope you figure it out and let me know how you get one.

guy_schneerson’s picture

Status: Active » Closed (works as designed)

Closing as no activity and can not recreate.

niki v’s picture

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.

andrey.troeglazov’s picture

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

darko_antunovic’s picture

@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

dkosbob’s picture

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

mydot’s picture

Status: Closed (works as designed) » Active

The same error still consists for the version 3.0.0-beta1