What I did, and my findings:

I installed commerce_product_bundles module for D7, and found that it leaves 5 orphaned field_config_instances in the database after uninstalling:

commerce_unit_price, commerce_total, commerce_product, commerce_display_path, commerce_parent_line_item

I think these are left because the module lacks a proper uninstall script, but I am not sure about that. The instances are all of the commerce_line_item entity type, and the bundle bundle type, so they seem to be distinct from the other commerce config instances with similar names.

I found these from Notices in the log when visiting admin/reports/fields, as there are the following 2 notices for each of the 5 instances:

Notice: Undefined index: bundle in field_ui_fields_list() (line 35 of /*/*/*/code/modules/field_ui/field_ui.admin.inc).

Notice: Undefined index: bundle in _field_ui_bundle_admin_path() (line 335 of /*/*/*/code/modules/field_ui/field_ui.module).

What I've done:

Reinstalling the module removes the notices.

I have deleted these field_config_instances locally in my dev environment to test, and haven't noticed anything adverse, but that doesn't give me enough piece of mind to delete them permanently.

I also reinstalled and looked for fields that would relate to those instances and found none.

My Question:

Is there a best practice to check the database for fields or data that might be hanging around relative to these instances? Or is there a way to check the database before and after removing them in a test environment to ensure nothing was corrupted in removing them?

I have access to phpMyAdmin, and drush, but am very new to database work.

Maybe a patch should be written to safely remove those instances upon uninstalling the module... I could open an issue for that, but the question is still pertinent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.