Closed (fixed)
Project:
Commerce Coupon (D7)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2012 at 09:22 UTC
Updated:
24 Jun 2012 at 15:41 UTC
Use commerce_delete_field() instead of commerce_delete_fields() in the uninstall hook to delete a single field.
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| commerce_coupon-uninstall.patch | 624 bytes | klausi |
Comments
Comment #1
deggertsen commentedWhen running uninstall with this patch applied I got this error.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'my_database.field_data_commerce_coupon_reference' doesn't exist: UPDATE {field_data_commerce_coupon_reference} SET deleted=:db_update_placeholder_0 WHERE (entity_type = :db_condition_placeholder_0) AND (bundle = :db_condition_placeholder_1) ; Array ( [:db_update_placeholder_0] => 1 [:db_condition_placeholder_0] => commerce_line_item [:db_condition_placeholder_1] => commerce_coupon ) in field_sql_storage_field_storage_delete_instance() (line 682 of /public_html/modules/field/modules/field_sql_storage/field_sql_storage.module).I had to revert back in order for uninstall to complete, but of course those two fields were not removed from the database. I have not tried to reproduce on a different drupal install yet.
Comment #2
pcambragood catch! thanks klausi, committed.
@deggertsen the patch is correct, your problems are not related with this one, you problably have a upgraded version that might be kind of broken.