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.
Every time I save an Ad node I get the following error:
user warning: Unknown column 'sitekey' in 'where clause' query: UPDATE ad_statistics SET count = count + 1 WHERE date = 2010060800 AND aid = 6149 AND action = 'create' AND adgroup = '' AND hostid = '' AND sitekey = '' in .../sites/all/modules/ad/ad.module on line 333.
Comment | File | Size | Author |
---|---|---|---|
#6 | 821160_ad_sitekey.patch | 1.32 KB | zoo33 |
Comments
Comment #1
Fspy CreditAttribution: Fspy commentedI am getting that same error.
Comment #2
Dubs CreditAttribution: Dubs commentedMe too...
Comment #3
Demian CreditAttribution: Demian commentedA. create the "sitekey" field manualy using phpMyAdmin
B. delete the "sitekey" from "Increment action counter" (line 333) - ad.module resulting to:
B2. If you follow the B. solution, keep in mind that you have patched a module file and you have to remember that in future updates. I think the best solution is the A. or to stick with the stable version.
Comment #4
hedac CreditAttribution: hedac commentedI created the sitekey field and now it works... What's the sitekey field for?
and which type of field do we have to create? I did a varchar.. but not sure...
it should be created by update.php
Comment #5
jmellon CreditAttribution: jmellon commentedfigured it out; Thanks for your entry, probably saved me an hour or two
Comment #6
zoo33 CreditAttribution: zoo33 commentedThe whole
sitekey
business was introduced in this commit (issue: #743848: ad_owners does not uninstall properly). It seems to have been unintentional, considering the commit message and the issue title.Anyway, if
sitekey
is part of some actual feature in this module, then there needs to be an update to the database schema.The supplied patch updates the hook_schema() implementation and adds an update function for existing users.
Comment #7
zoo33 CreditAttribution: zoo33 commentedBTW, I tested the update function on a site of my own, and that at least seems to work without a problem.
Comment #8
tacoparty CreditAttribution: tacoparty commentedWould there be any problem with just ignoring the error? The ads I've created still seem to function the way they're supposed to. Interested to know if it's really worth worrying about.
Thanks
Comment #9
vishun CreditAttribution: vishun commentedPatch from #6 works. After applying the patch all I had to do was run a site update and it added the column. Thanks zoo33.
Comment #10
anonymous07 CreditAttribution: anonymous07 commented+1 for seeing this issue (when removing an Ad from a Channel, since the Channel display algorithm doesn't appear to be working)
and +1 for the patch working.
Thanks zoo33 for the patch.
Comment #11
Majdi CreditAttribution: Majdi commented#6 works for me
Comment #12
eric.chenchao CreditAttribution: eric.chenchao commentedsubscribe
Comment #13
John Franklin CreditAttribution: John Franklin commentedFixed by reversion in #743848: ad_owners does not uninstall properly.