Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
Screenshot-1.png | 15.37 KB | maxchock |
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedYou 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.
Comment #2
maxchock CreditAttribution: maxchock commentedbut 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??
Comment #3
bojanz CreditAttribution: bojanz commentedThere 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).
Comment #4
maxchock CreditAttribution: maxchock commentedNow 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??
Comment #5
Stan Turyn CreditAttribution: Stan Turyn commentedI had the same issue and had to disable commerce_product using drush to be able to get rid of commerce_product_reference.
Comment #6
maxchock CreditAttribution: maxchock commentedi can't find a way so I re-install drupal...
Comment #7
rszrama CreditAttribution: rszrama commentedThat's what I normally do, too. ; )
Comment #8
Konstantin Boyandin CreditAttribution: Konstantin Boyandin commentedNo 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.
Comment #9
maxchock CreditAttribution: maxchock commentedjust wait..... if you don't want to re-install...
Comment #10
bojanz CreditAttribution: bojanz commented@#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...
Comment #11
Stan Turyn CreditAttribution: Stan Turyn commentedDo 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.
Comment #12
maxchock CreditAttribution: maxchock commentedwhat if using shared hosting and cannot access drush??
Comment #13
bojanz CreditAttribution: bojanz commented@#12: See my explanation in #10 on how to do it.
There's a UX problem here, but that's all.
Comment #15
njcheng CreditAttribution: njcheng commentedJust 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
Comment #16
jeremymcminn CreditAttribution: jeremymcminn commentedHave to say I got fedup with this, totally ruined my site - so doing a fresh reinstall now.
Comment #17
rszrama CreditAttribution: rszrama commentedSorry 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.
Comment #18
jacobson CreditAttribution: jacobson commentedI 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.
Comment #19
rszrama CreditAttribution: rszrama commentedComment #20
maxchock CreditAttribution: maxchock commentedPlease consider if someone like me have no access to console.....
Comment #21
bojanz CreditAttribution: bojanz commentedI keep giving an answer and the answer keeps getting ignored.
Some members of the community have the reading comprehension skills of a clock.
Comment #23
ristojj CreditAttribution: ristojj commentedbojanz: 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
Comment #24
bojanz CreditAttribution: bojanz commentedSorry, 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.
Comment #26
mynameispj CreditAttribution: mynameispj commentedHey 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.
Comment #27
mynameispj CreditAttribution: mynameispj commentedComment #28
mynameispj CreditAttribution: mynameispj commented