I have assigned an attribute to a product class where most of the products under that class will require the attribute. For those products that don't require the attribute i delete them from the attribute tab on the product edit screen.
Problem is, when i try to remove the attribute i get the following error and the removal fails.
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1 AS expression FROM d7_uc_attribute_options ao WHERE (d7_uc_product_op' at line 1: DELETE FROM {uc_product_options} WHERE ( EXISTS SELECT 1 AS expression FROM {uc_attribute_options} ao WHERE ({uc_product_options}.oid = ao.oid) AND (ao.oid IN (:db_condition_placeholder_0)) ) AND (uc_product_options.nid = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 235 ) in uc_object_attributes_form_submit() (line 782 of /www/sites/all/modules/ubercart/uc_attribute/uc_attribute.admin.inc).
anyone else experienced this? Thoughts on a fix?
Drupal 7 RC 4
Ubercart 7.x-3.0-beta1
cheers,
Damian
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1011466_product_options_delete.patch | 587 bytes | Island Usurper |
Comments
Comment #1
Island Usurper commentedI'm on the latest Drupal and Ubercart, and I'm not seeing this problem. I'm on the latest Drupal, and I with Devel, I can see a ( between the EXISTS and SELECT, which there should be.
However, I notice that query isn't deleting all of the options that it's supposed to, so here's a quick patch to take care of that, too.
Committed.