Hi all,

I want to disable Commerce but I don't know why it cannot. Commerce, Customer, Line Item, Price, Product cannot be disable because of Product Reference. But i can see Product Reference has no dependency except for "Drupal (Field type(s) in use - see Field list)". How to remove those?? Please see the Screenshot-1.png I attached for more clear picture.

TQ.

Files: 
CommentFileSizeAuthor
Screenshot-1.png15.37 KBmaxchock

Comments

Status:Active» Fixed

You can't disable Product reference if fields of that type still exist in the system (usually attached to your product display nodes).
So go through your content types, delete the product reference fields, run cron, then return to the modules page and do your thing.

but i've check, all the product display and field regarding to commerce has been total delete.. still no luck.. anyway to manually for force to uninstall Commerce??

There must be a field instance left somewhere, click the "see Field list" part of "Drupal (Field type(s) in use - see Field list)".
Nothing that Commerce can do here, Drupal core is behind this behavior (and it makes sense, you can't disable a module providing a field type if there are fields of that type active).

Now these are the error when i click on the Field list (http://www.victoria.my/#overlay=admin/reports/fields).

Notice: Undefined index: comment_node_furniture in _field_ui_bundle_admin_path() (line 320 of /home/victori2/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: comment_node_furniture in field_ui_fields_list() (line 35 of /home/victori2/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: bundle in _field_ui_bundle_admin_path() (line 320 of /home/victori2/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: bundle in field_ui_fields_list() (line 35 of /home/victori2/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: bundle in _field_ui_bundle_admin_path() (line 320 of /home/victori2/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: bundle in field_ui_fields_list() (line 35 of /home/victori2/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: bundle in _field_ui_bundle_admin_path() (line 320 of /home/victori2/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: bundle in field_ui_fields_list() (line 35 of /home/victori2/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: bundle in _field_ui_bundle_admin_path() (line 320 of /home/victori2/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: bundle in field_ui_fields_list() (line 35 of /home/victori2/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: bundle in _field_ui_bundle_admin_path() (line 320 of /home/victori2/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: bundle in field_ui_fields_list() (line 35 of /home/victori2/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: furniture in _field_ui_bundle_admin_path() (line 320 of /home/victori2/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: furniture in field_ui_fields_list() (line 35 of /home/victori2/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: furniture in _field_ui_bundle_admin_path() (line 320 of /home/victori2/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: furniture in field_ui_fields_list() (line 35 of /home/victori2/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: furniture in _field_ui_bundle_admin_path() (line 320 of /home/victori2/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: furniture in field_ui_fields_list() (line 35 of /home/victori2/public_html/modules/field_ui/field_ui.admin.inc).

so anyway to remove them manually??

I had the same issue and had to disable commerce_product using drush to be able to get rid of commerce_product_reference.

i can't find a way so I re-install drupal...

That's what I normally do, too. ; )

No way to uninstall the Commerce
I can't uninstall Price, since ity has field referenced in Product. Those fields are locked, how do I remove them, I wonder?
Re-installing Drupal is out of question.

just wait..... if you don't want to re-install...

@#8 uninstall product first. That will delete the locked fields, allowing you to uninstall price. Don't forget that uninstall is a separate process and a separate tab on the modules page, after which you should also run cron.

No waiting will help you, uninstalling and disabling modules is just broken in drupal 7...

Do not re-install Drupal, people!

As per my comment #5 if you are stuck with commerce_product_reference because of the field type use drush to disable commerce_product:

drush pm-disable commerce_product

(and yes, ignore the fact that product_reference depends on product)

Disabling product using drush will also disable product_reference. So now you can uninstall the rest with no problems.

what if using shared hosting and cannot access drush??

@#12: See my explanation in #10 on how to do it.

There's a UX problem here, but that's all.

Just wanted to add some related threads with reports of the same error message in hopes that it helps maintainers figure out where the real problem lies. It seems to be affecting many modules in many contexts when a content or field is deleted:

http://drupal.org/node/1304664
http://drupal.org/node/1334522
http://drupal.org/node/686938
http://drupal.org/node/1351506
http://drupal.org/node/1332872
http://drupal.org/node/1357792

Have to say I got fedup with this, totally ruined my site - so doing a fresh reinstall now.

Sorry you had such trouble; based on your other comment, it appears you still needed to delete some fields. When dealing with any module of this size, we strongly recommend you use a development site that can be easily trashed and recreated. That should become your best practice for any project on d.o.

Title:Cannot disable completely...Use Drush Per #5

I echo klearvue's comment in #5. Drush does the job. Then, use the Drupal UI to uninstall Product Reference and Product and then disable the remaining Commerce modules and uninstall them.

And, if you cannot disable the remaining Commerce modules using the Drupal UI, then repeat use of Drush to disable remaining Commerce modules, except the main Commerce module. Once all Commerce modules (other than the main Commerce module) are disabled, the Modules Uninstall page will allow you to uninstall the remaining Commerce modules.

Then, finally, you can disable and uninstall the main Commerce module.

Title:Use Drush Per #5Cannot disable Commerce modules completely; solved using drush per comment #5

Please consider if someone like me have no access to console.....

I keep giving an answer and the answer keeps getting ignored.
Some members of the community have the reading comprehension skills of a clock.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bojanz: I've having the same problem and I cannot uninstall product before I have disabled it. And it cannot be disabled before product referense is disabled. So your tip "uninstall product first, That will delete the locked fields, allowing you to uninstall price." is impossible to follow

Sorry, there was a bug there (combined with more recent core versions), which we fixed.
Update to Commerce 1.2, and then uninstall it.
It will allow you to disable the modules normally, without the uninstall steps.
See #1403972: Make uninstallation possible again for more info.

Title:Cannot disable Commerce modules completely; solved using drush per comment #5This still seems to be an issue in Commerce 1.3

Hey everyone, I'm on Shared hosting and was using Commerce 1.3 and ran into this issue. As I'm on shared I couldn't use drush to fix, and as #23 detailed, I was in a Catch-22 where I couldn't uninstall Product before disabling it and couldn't disable Product until I disabled Commerce File, which wouldn't let me disable it because it said the Field was in use when it wasn't. I actually (and unfortunately) did have to resort to a fresh install and rebuild.

Title:This still seems to be an issue in Commerce 1.3Cannot disable Commerce modules completely; solved using drush

Title:Cannot disable Commerce modules completely; solved using drushCannot disable Commerce modules completely; solved using drush per comment #5