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.
In "uc_product_power_tools.install" and "uc_product_power_tools.admin.inc" the db_query(...) method is being used with a "REPLACE" SQL statement.
This fails on databases that do not have a "REPLACE" SQL statement.
Simply using the db_merge(...) method fixes this problem.
I've attached the changes I made with the SQL statements of "UPDATE" and "REPLACE" being used, and are now using the db_update(...) and db_merge(...) statements instead.
I'd suggest using the db_select(...) method with all "SELECT" statements as well, however.
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#2 | uc_product_power_tools.patch | 4.79 KB | sher1 |
uc_product_power_tools.admin.inc | 13.95 KB | cmurph | |
uc_product_power_tools.admin_.inc_.txt | 25.47 KB | cmurph |
Comments
Comment #1
TR CreditAttribution: TR commentedThe port to D7 hasn't been finished yet. Thank you for identifying one of the things that still needs to be done.
The SELECT statements should not be changed; static queries in Drupal are supposed to use SELECT instead of db_select().
Please DO NOT attach complete files to an issue. They're pretty useless as they are unknown versions that have been modified in unknown ways. It makes maintenance and support of the module harder if there are unknown modifications floating around, and it makes it impossible for the community to evaluate the fixes. I'm not about to comb through that file line-by-line to try to figure out what changes you've made. Changes/fixes should be provided in the form of a patch. See http://drupal.org/patch for details.
Comment #2
sher1 CreditAttribution: sher1 commentedHere is your patch file. I grabbed the new and your old and did the diff and created the patch.