Closed (fixed)
Project:
Advertisement
Version:
6.x-2.x-dev
Component:
ad module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2009 at 16:24 UTC
Updated:
30 Aug 2010 at 12:17 UTC
Hi
I have installed ad, image as and reports modules. When I click on an ad, i receive this error:
user warning: Unknown column 'extra' in 'field list' query: INSERT INTO ad_clicks (aid, uid, status, hostname, user_agent, adgroup, extra, hostid, url, timestamp) VALUES (1161, 1, 0, '127.0.0.1', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8', '0', '', '', 'http://....com/', 1238775259) in ...sites\all\modules\ad\ad.module on line 248
I checked the ad.install file and there is no definistion for field 'extra' in there. I believe it is missing there.
Comments
Comment #1
jeremy commentedThanks, fix committed.
Comment #2
Zombie777 commentedI am getting it also, but only when I click on the ad and navigate away from the page then come back and click on any non ad in drupal.
Comment #3
jeremy commentedYou'll need the latest code from CVS, or to wait for the next release.
Comment #4
mstef commented[edit]
Comment #5
mstef commentedStill having problems:
Unknown column 'extra' in 'where clause' query: UPDATE ad_statistics SET count = count + 1 WHERE aid = 14174 AND action = 'view' AND date = 2009041017 AND adgroup = 't40' AND extra = '' AND hostid = '' in /home/poweron/public_html/sites/all/modules/ad/adcache.inc on line 299.
Installed and updated to the latest code..
Comment #6
mstef commentedFrom what I can assume, this is what is causing cron to not be able to finish for me - though not confirmed yet.
Comment #7
meppy commentedHaving the same error, the table does not have that column, was considering adding it but unsure of what type to give it. Might try modifying the query and see what happens... I wonder if the table creation didn't work 100%?
Comment #8
meppy commentedThis is the relevant code that should add the columns, I don't know enough about how modules work and are installed to understand why it hasn't worked, but I just added the columns based on this code and the problem _appears_ to be fixed.
function ad_update_6004() {
$ret = array();
db_add_field($ret, 'ad_statistics', 'extra',
array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Alow add-on modules to provide additional statistics granularity.',
),
array('indexes' => array(
'extra' => array('extra'))
));
db_add_field($ret, 'ad_clicks', 'extra',
array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Alow add-on modules to provide additional statistics granularity.',
),
array('indexes' => array(
'extra' => array('extra'))
));
return $ret;
}
Comment #9
jeremy commentedAgain, this is fixed in the -dev tarball, so either wait for the next rc, update to the -dev release, or fix it manually as meppy did in #8.
Comment #10
dresde commented@meppy
So, I'm having the same problem and it took me so long to find this post!!! Where do I have to ad that code to fix the problem? Right today I updated to ad-6.x-2.0-rc1 and I still have the problem!
-----------
edit
----------
Ops, I just realized it is NOT the same problem. Mine is
user warning: Unknown column 'extra' in 'where clause' query: UPDATE ad_statistics SET count = count + 1 WHERE aid = 89 AND action = 'view' AND date = 2009041714 AND adgroup = '0' AND extra = '' AND hostid = '' in /usr/local/www/vhosts/mydomain/httpdocs/drupal/sites/all/modules/ad/adcache.inc on line 299.
Sorry
Comment #11
jeremy commentedThe simplest fix is to force ad module's update 6004 to run.
Comment #13
stanyul commentedI seem to be getting this error message when trying to upload ads with the ad module.
user warning: Table 'XXX123_drupal.XXXXXXX_ad_statistics' doesn't exist query: UPDATE XXXXXXXX_ad_statistics SET count = count + 1 WHERE date = 2010083008 AND aid = 875 AND action = 'update' AND adgroup = '' AND hostid = '' in /home/XXX123/public_html/sites/all/modules/ad/ad.module on line 328.
Any idea what might be causing this? I'm new to drupal and a wysiwyg'r... so any suggestions would help out great