Hello,
im using Drupal 6.14 and PHP 5.2.11-pl1-gentoo.

I created 4 ads (3image and 1text).
2 of them in a channel, the other in none. 3 of all are in a group.
Now i put the Default Block and the Group Block on my leftsidebar, and nothing is shown. Then i put it in content, and only a empty block is shown.

What can i do?

ad_dir: '/home/y/o/MYSITE/htdocs/sites/all/modules/ad'
debug: '2'
adcache: 'none'
nids: ''
tids: '0'
hostid: ''
url: 'node/61'
alias: 'content/home'
quantity: '1'
aid: '0'
ad_display: 'javascript'
--> Time mark: 11:39:35
Memory usage: 70.980 K
Drupal bootstrap '0'.
Drupal bootstrap complete.
Root drupal directory detected as '/home/y/o/MYSITE/htdocs'.

/home/y/o/MYSITE/htdocs/sites/all/modules/ad/serve.php: // $Id: serve.php,v 1.1.2.2.2.1.2.1 2009/02/23 22:39:02 jeremy Exp $
/home/y/o/MYSITE/htdocs/sites/all/modules/ad/adserve.inc: // $Id: adserve.inc,v 1.1.2.31.2.8.2.10 2009/11/23 19:12:41 Jeremy Exp $
/home/y/o/MYSITE/htdocs/sites/all/modules/ad/adcache.inc:
/home/y/o/MYSITE/htdocs/sites/all/modules/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.83.2.16.2.37 2009/11/30 16:24:08 Jeremy Exp $
/home/y/o/MYSITE/htdocs/sites/all/modules/ad/ad.install: // $Id: ad.install,v 1.2.2.4.2.27.2.7.2.8 2009/10/20 23:31:22 jeremy Exp $

adserve_cache function(get_ad_ids)
Cache function 'ad_cache_none_get_ad_ids' does not exist.
Memory usage: 76.438 K
Invoking cache function 'adserve_cache_get_ad_ids'.
Entering default adserve_display.
adserve_cache function(open)
Cache function 'ad_cache_none_open' does not exist.
Memory usage: 77.285 K
Invoking cache function 'adserve_cache_open'.
Drupal bootstrap '8'.
--> Time mark: 11:39:37
Memory usage: 1,972.055 K
Drupal bootstrap complete.
Hostid: 'none'.
adserve_invoke_hook hook(init) action(first)
adserve_cache function(hook)
Cache function 'ad_cache_none_hook' does not exist.
Memory usage: 1,972.336 K
Invoking cache function 'adserve_cache_hook'.
adserve_cache function(get_cache)
Cache function 'ad_cache_none_get_cache' does not exist.
Memory usage: 1,973.293 K
Invoking cache function 'adserve_cache_get_cache'.
adserve_cache function(build_hooks)
Cache function 'ad_cache_none_build_hooks' does not exist.
Memory usage: 1,978.035 K
Invoking cache function 'adserve_cache_build_hooks'.
Did not find hook 'init'.
Function 'adserve_hook_init' does not exist.
adserve_cache function(id)
Cache function 'ad_cache_none_id' does not exist.
Memory usage: 1,978.336 K
Invoking cache function 'adserve_cache_id'.
adserve_cache_id: type(host) id()
adserve_cache_id: unsupported type 'host'.
Searching default: 0
adserve_cache function(id)
Memory usage: 1,978.578 K
Invoking cache function 'adserve_cache_id'.
adserve_cache_id: type(default) id(0)
adserve_cache_id: SELECT a.aid FROM {ads} a LEFT JOIN {term_node} n ON a.aid = n.nid WHERE a.adstatus = 'active' AND n.tid IS NULL
Total ads: '0'.
Already displayed: 0
adserve_cache function(validate)
Cache function 'ad_cache_none_validate' does not exist.
Memory usage: 1,979.379 K
Invoking cache function 'adserve_cache_validate'.
Validated ads: '0'.
adserve_invoke_hook hook(filter) action(intersect)
adserve_cache function(hook)
Memory usage: 1,979.672 K
Invoking cache function 'adserve_cache_hook'.
Invoking hook 'filter'.
Including file: '/home/y/o/MYSITE/htdocs/sites/all/modules/ad/channel/ad_channel.inc'.
Invoking 'ad_channel_cache_filter'.
ad_channel_cache: adserve_cache_filter
adserve_cache function(get_cache)
Memory usage: 1,981.504 K
Invoking cache function 'adserve_cache_get_cache'.
adserve_cache function(get_cache)
Memory usage: 1,982.449 K
Invoking cache function 'adserve_cache_get_cache'.
ad_channel_cache: returning non-premiere advertisements from randomly selected channel
Filtered ads: '0'.
adserve_invoke_hook hook(weight) action(first)
adserve_cache function(hook)
Memory usage: 1,979.977 K
Invoking cache function 'adserve_cache_hook'.
Invoking hook 'weight'.
Including file: '/home/y/o/MYSITE/htdocs/sites/all/modules/ad/weight/probability/ad_weight_probability.inc'.
Invoking 'ad_weight_probability_cache_filter'.
Weighted ads: '0'.
adserve_invoke_hook hook(select) action(first)
adserve_cache function(hook)
Memory usage: 1,980.691 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'select'.
Invoking 'adserve_hook_select'.
No more advertisements available.
Selected ads: '0'.
adserve_cache function(display)
Cache function 'ad_cache_none_display' does not exist.
Memory usage: 1,978.805 K
Invoking cache function 'adserve_cache_display'.
adserve_cache function(increment)
Cache function 'ad_cache_none_increment' does not exist.
Memory usage: 1,980.141 K
Invoking cache function 'adserve_cache_increment'.
adserve_cache_increment action(count) aid() hostid()
Drupal bootstrap '8'.
Drupal bootstrap complete.
adserve_invoke_hook hook(increment_extra) action(merge)
adserve_cache function(hook)
Memory usage: 1,981.695 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'increment_extra'.
Function 'adserve_hook_increment_extra' does not exist.
adserve_cache_increment extra()
adserve_cache function(close)
Cache function 'ad_cache_none_close' does not exist.
Cache function 'adserve_cache_close' does not exist.
adserve_invoke_hook hook(init_text) action(append)
adserve_cache function(hook)
Memory usage: 1,981.453 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'init_text'.
Function 'adserve_hook_init_text' does not exist.
adserve_invoke_hook hook(exit_text) action(append)
adserve_cache function(hook)
Memory usage: 1,981.625 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'exit_text'.
Function 'adserve_hook_exit_text' does not exist.
Memory usage: 1,980.902 K
document.write('\x3c!-- No active ads were found in 0 --\x3e');

Comments

ezar’s picture

Same here. I'm using php 5.3.2 and drupal 6.16

ad_dir: '/var/www/drupal_site/sites/all/modules/custom/ad'
debug: '2'
adcache: 'none'
nids: ''
tids: '1495'
hostid: ''
url: 'node/50099'
alias: 'node/50099'
quantity: '1'
aid: '0'
ad_display: 'javascript'
--> Time mark: 19:55:54
Memory usage: 694.977 K
Drupal bootstrap '0'.
Override domain_bootstrap_modules: 'Array'
Drupal bootstrap complete.
Root drupal directory detected as '/var/www/drupal_site'.

/var/www/drupal_site/sites/all/modules/custom/ad/serve.php: // $Id: serve.php,v 1.1.2.2.2.1.2.1 2009/02/23 22:39:02 jeremy Exp $
/var/www/drupal_site/sites/all/modules/custom/ad/adserve.inc: // $Id: adserve.inc,v 1.1.2.31.2.8.2.10 2009/11/23 19:12:41 Jeremy Exp $
/var/www/drupal_site/sites/all/modules/custom/ad/adcache.inc:
/var/www/drupal_site/sites/all/modules/custom/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.83.2.16.2.37 2009/11/30 16:24:08 Jeremy Exp $
/var/www/drupal_site/sites/all/modules/custom/ad/ad.install: // $Id: ad.install,v 1.2.2.4.2.27.2.7.2.8 2009/10/20 23:31:22 jeremy Exp $

adserve_cache function(get_ad_ids)
Cache function 'ad_cache_none_get_ad_ids' does not exist.
Memory usage: 1,557.043 K
Invoking cache function 'adserve_cache_get_ad_ids'.
Entering default adserve_display.
adserve_cache function(open)
Cache function 'ad_cache_none_open' does not exist.
Memory usage: 1,557.730 K
Invoking cache function 'adserve_cache_open'.
Drupal bootstrap '8'.
--> Time mark: 19:55:55
Memory usage: 41,098.484 K
Drupal bootstrap complete.
Hostid: 'none'.
adserve_invoke_hook hook(init) action(first)
adserve_cache function(hook)
Cache function 'ad_cache_none_hook' does not exist.
Memory usage: 41,099.070 K
Invoking cache function 'adserve_cache_hook'.
adserve_cache function(get_cache)
Cache function 'ad_cache_none_get_cache' does not exist.
Memory usage: 41,099.836 K
Invoking cache function 'adserve_cache_get_cache'.
adserve_cache function(build_hooks)
Cache function 'ad_cache_none_build_hooks' does not exist.
Memory usage: 41,103.367 K
Invoking cache function 'adserve_cache_build_hooks'.
Did not find hook 'init'.
Function 'adserve_hook_init' does not exist.
adserve_cache function(id)
Cache function 'ad_cache_none_id' does not exist.
Memory usage: 41,103.496 K
Invoking cache function 'adserve_cache_id'.
adserve_cache_id: type(host) id()
adserve_cache_id: unsupported type 'host'.
Searching tids: 1495
adserve_cache function(id)
Memory usage: 41,103.785 K
Invoking cache function 'adserve_cache_id'.
adserve_cache_id: type(tids) id(1495)
adserve_cache_id: SELECT a.aid FROM {ads} a INNER JOIN {term_node} n ON a.aid = n.nid WHERE a.adstatus = 'active' AND n.tid IN(1495)
Total ads: '2'.
Already displayed: 0
adserve_cache function(validate)
Cache function 'ad_cache_none_validate' does not exist.
Memory usage: 46,238.254 K
Invoking cache function 'adserve_cache_validate'.
Validated ads: '2'.
adserve_invoke_hook hook(filter) action(intersect)
adserve_cache function(hook)
Memory usage: 46,238.625 K
Invoking cache function 'adserve_cache_hook'.
Invoking hook 'filter'.
Including file: '/var/www/drupal_site/sites/all/modules/custom/ad/channel/ad_channel.inc'.
Invoking 'ad_channel_cache_filter'.
ad_channel_cache: adserve_cache_filter
adserve_cache function(get_cache)
Memory usage: 46,295.496 K
Invoking cache function 'adserve_cache_get_cache'.
ad_channel_cache: checking aid(50099)
ad_channel_cache: aid(50099) has no channel info, nochannel_display(0)
ad_channel_cache: non-channel aid(50099) is valid if no valid ads are assigned to current channel
ad_channel_cache: checking aid(50100)
ad_channel_cache: aid(50100) has no channel info, nochannel_display(0)
ad_channel_cache: non-channel aid(50100) is valid if no valid ads are assigned to current channel
ad_channel_cache: using ads with no channel info
adserve_cache function(get_cache)
Memory usage: 46,296.629 K
Invoking cache function 'adserve_cache_get_cache'.
ad_channel_cache: aid(50099) is premiere advertisement
ad_channel_cache: aid(50100) is not a premiere advertisement
ad_channel_cache: returning premiere advertisements
Filtered ads: '1'.
adserve_invoke_hook hook(weight) action(first)
adserve_cache function(hook)
Memory usage: 46,293.359 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'weight'.
Invoking 'adserve_hook_weight'.
Weighted ads: '1'.
adserve_invoke_hook hook(select) action(first)
adserve_cache function(hook)
Memory usage: 46,293.570 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'select'.
Invoking 'adserve_hook_select'.
Randomly selecting ad 1 of 1.
Randomly selected ID: .
adserve_cache function(validate)
Memory usage: 46,296.383 K
Invoking cache function 'adserve_cache_validate'.
Selected ads: '1'.
adserve_cache function(display)
Cache function 'ad_cache_none_display' does not exist.
Memory usage: 46,292.117 K
Invoking cache function 'adserve_cache_display'.
adserve_cache function(display_ad)
Cache function 'ad_cache_none_display_ad' does not exist.
Memory usage: 46,293.352 K
Invoking cache function 'adserve_cache_display_ad'.
Ad type '', loading module ''
ad:
adserve_cache function(increment)
Cache function 'ad_cache_none_increment' does not exist.
Memory usage: 46,293.863 K
Invoking cache function 'adserve_cache_increment'.
adserve_cache_increment action(view) aid() hostid()
Drupal bootstrap '8'.
Drupal bootstrap complete.
adserve_invoke_hook hook(increment_extra) action(merge)
adserve_cache function(hook)
Memory usage: 46,295.371 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'increment_extra'.
Function 'adserve_hook_increment_extra' does not exist.
adserve_cache_increment extra()
adserve_cache function(close)
Cache function 'ad_cache_none_close' does not exist.
Cache function 'adserve_cache_close' does not exist.
adserve_invoke_hook hook(init_text) action(append)
adserve_cache function(hook)
Memory usage: 46,294.918 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'init_text'.
Function 'adserve_hook_init_text' does not exist.
adserve_invoke_hook hook(exit_text) action(append)
adserve_cache function(hook)
Memory usage: 46,295.102 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'exit_text'.
Function 'adserve_hook_exit_text' does not exist.
Memory usage: 46,294.375 K
document.write('');

devworx_pilz’s picture

any idea what i can do to solve the problem?

pendashteh’s picture

Priority: Critical » Normal

same problem; the module were working on my local PC (Windows/XAMPP), but after moving to server (Linux) ad blocks are empty.

there is also an strange thing. I cannot access to sites/all/modules/ad/serve.php via browser. it gives me Page not found on drupal.
I tried disabling Clean Urls and some changes on .htaccess. nothing changed.

so I cannot send debug text.

pendashteh’s picture

Priority: Normal » Critical
ptam’s picture

Priority: Normal » Critical

Debug code for image ad :-

ad_dir: 'C:/Program Files/xampp/htdocs/dev/sites/all/modules/ad'
debug: '2'
adcache: 'none'
nids: ''
tids: ''
hostid: ''
url: ''
alias: ''
quantity: '1'
aid: '22919'
ad_display: 'javascript'
--> Time mark: 05:53:27
Drupal bootstrap '0'.
Drupal bootstrap complete.
adserve_counter_image: increment 'view' counter for aid: 22919
adserve_cache function(increment)
Cache function 'ad_cache_none_increment' does not exist.
Invoking cache function 'adserve_cache_increment'.
adserve_cache_increment action(view) aid(22919) hostid()
Drupal bootstrap '8'.
Drupal bootstrap complete.
adserve_invoke_hook hook(increment_extra) action(merge)
adserve_cache function(hook)
Cache function 'ad_cache_none_hook' does not exist.
Invoking cache function 'adserve_cache_hook'.
adserve_cache function(get_cache)
Cache function 'ad_cache_none_get_cache' does not exist.
Invoking cache function 'adserve_cache_get_cache'.
adserve_cache function(build_hooks)
Cache function 'ad_cache_none_build_hooks' does not exist.
Invoking cache function 'adserve_cache_build_hooks'.
Did not find hook 'increment_extra'.
Function 'adserve_hook_increment_extra' does not exist.
adserve_cache_increment extra()
ÿØÿà�JFIF������ÿþ�>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ÿÛ�C� $.' ",#(7),01444'9=82<.342ÿÛ�C 2!!22222222222222222222222222222222222222222222222222ÿÀ���"�ÿÄ����������� ÿÄ�µ���}�!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ�������� ÿÄ�µ��w�!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ���?�ùþŠ( ÿÙ

streever’s picture

My ads block is SOMETIMES empty (same config as the users above).

Sometimes the ads are there: sometimes they are not.

Has anyone encountered this?

ptoly’s picture

Version: 6.x-2.2 » 6.x-2.x-dev

I've spent 3 days stepping through this in Xdebug and this is what I've got so far (same problem here - Drupal 6.19, tried both dev and release version of Ad).

I can only get ads to show if I choose Display advertisements not assigned to any channel = Always

It appears that there is a problem with the channel filtering system and the ad expected to be pulled and presented is not getting it's assigned channel pulled from the db and validated against the current channel.

The problem is I have not yet figured out where the channel info is supposed to be pulled. I'm looking for a query that does it. There is a query in the channel.module but not in the ad_channel.inc.

I'm wondering if the problem lies in

 // get channel array from cache
  $channels = adserve_cache('get_cache', 'channel');

from line 22 of ad_channel.inc is expecting a cache, when I don't have one?

I've tried it with and without caching module on.

At any rate the ad is stopped from appearing here:
if (is_array($channels['ads']) && isset($channels['ads'][$aid]) && is_array($channels['ads'][$aid])) in line 29 of ad_channel.inc because there is no $channels['ads'][$aid].

At this point I would not be surprised if I'm missing something - staring at xdebug for hrs does fog the mind...

Any suggestions on what the mechanism/functions I should be looking at to match up the channel array with current array of ads?

Thanks

ptoly’s picture

Finally found the problem. For anyone who is having problems and getting things like

ad_channel_cache: aid(#) has no channel info

with version 6.x-2.x-dev, 2011-04-24.

This is due to a type in the channel.module file. Change line 562 from
$result = db_query('SELECT chid FROM {ad_channel_node} WHERE nid = %d', $ad->nid);
to
$result = db_query('SELECT chid FROM {ad_channel_node} WHERE nid = %d', $ad->aid);

So the ->nid is incorrect. It should be ->aid instead.

lrwebks’s picture

Status: Active » Closed (outdated)

Drupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!