ad module not displaying ad
drueditor - October 6, 2009 - 12:30
| Project: | Advertisement |
| Version: | 6.x-2.1 |
| Component: | ad module |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
I installed and activated the ad module and components
Created an advertisement and uploaded it to my site
Created and activated a new block for the advertisement
But advertisment is not displayed on the block

#1
I installed and activated the ad module and components
Created an advertisement and uploaded it to my site
Created and activated a new block for the advertisement
But advertisment is not displayed on the block.
I ran update.php and got the following:
The selected file D:\my\online\site.com\tmp\fil1C80.tmp could not be copied.
What do I need to do in order to display my ads?
#2
Was this a fresh install of the ad module, or an upgrade? I see from your tmp path that it is a Windows system -- what web server are you using?
Please follow the directions found in documentation/DEBUG.txt ad post the output here.
#3
Upgraded from Drupal 6.12 to 6.14 and did a re-install of ad module.
Hosting on Windows system on an IIS server
The debug report came up as follows:
ad_dir: 'd:\...\sites\all\modules\ad'
debug:'2'
adcache:'none'
nids:"
tids:"
hostid:"
url:"
quantity:'3'
aid:'0'
ad_display:'javascript'
Hope the above details is what you had asked for?
#4
When collecting debug info, you have to convert all the
&'s to just a plain&as explained in DEBUG.txt. It appears you did not do so above, and thus you have not collected any useful debug data.#5
Having the same problem, an image ad in a block doesn't display on Windows XP using IIS. The output block looks like this copied from Firebug:
<div id="group-id-tids-1" class="advertisement group-tids-1"><script src="http://drupaldefault/sites/all/modules/ad/serve.php?q=5&t=1&u=admin%2Fbuild%2Fblock%2Flist" type="text/javascript">
1Failed to load source for: http://drupaldefault/sites/all/modules/ad/serve.php?q=5&t=1&u=admin%2Fbuild%2Fblock%2Flist
</script>
</div>
The "1Failed to load source for: http://drupaldefault/sites/all/modules/ad/serve.php?q=5&t=1&u=admin%2Fbuild%2Fblock%2Flist" printout originates from Firebug and is not present when viewing source in a browser. However, this may give some indication of what the problem might be.
I try to collect debug info using the URL http://drupaldefault/sites/all/modules/ad/serve.php?q=5&t=1&u=admin%2Fbu... from the view source of the browser, but this fails. Adding the "&debug=2" at the end of the URL doesn't display anything useful either.
Tried all types of display modes (Javascript, JQuery, etc), none will display the image ad.
Grateful for any ideas.
ps. I have read the thread on the issue "Ad image won't display in block when served with IIS" without finding an answer to my problem.
#6
I'm having the same problem on a fresh install of Drupal + Advertisement (with Image Ad enabled). I'm developing on my local machine using WAMP. Set up the exact same thing 2 months ago without difficulty.
I am trying to display the image ads inside blocks. When I copy the URL found in the source to the browser, as instructed, it tells me:
document.write('\x3c!-- No active ads were found in t2 --\x3e');Both my ads are marked as 'active' and are assigned to the correct group.
When I add "&debug=2":
ad_dir: 'C:/wamp/www/CHBA/sites/all/modules/ad'
debug: '2'
adcache: 'none'
nids: ''
tids: '2'
hostid: ''
url: 'node/46'
alias: 'home'
quantity: '1'
aid: '0'
ad_display: 'javascript'
--> Time mark: 15:27:22
Memory usage: 534.758 K
Drupal bootstrap '0'.
Drupal bootstrap complete.
Root drupal directory detected as 'C:\wamp\www\CHBA'.
C:/wamp/www/CHBA/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 $
C:/wamp/www/CHBA/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 $
C:/wamp/www/CHBA/sites/all/modules/ad/adcache.inc:
C:/wamp/www/CHBA/sites/all/modules/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.83.2.16.2.36 2009/11/23 06:40:02 Jeremy Exp $
C:/wamp/www/CHBA/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: 542.141 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: 545.195 K
Invoking cache function 'adserve_cache_open'.
Drupal bootstrap '8'.
--> Time mark: 15:27:23
Memory usage: 13,051.445 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: 13,053.742 K
Invoking cache function 'adserve_cache_hook'.
adserve_cache function(get_cache)
Cache function 'ad_cache_none_get_cache' does not exist.
Memory usage: 13,055.180 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: 13,058.883 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: 13,055.336 K
Invoking cache function 'adserve_cache_id'.
adserve_cache_id: type(host) id()
adserve_cache_id: unsupported type 'host'.
Searching tids: 2
adserve_cache function(id)
Memory usage: 13,055.352 K
Invoking cache function 'adserve_cache_id'.
adserve_cache_id: type(tids) id(2)
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(2)
adserve_cache_id: Ad '75' failed access check.
Total ads: '0'.
Already displayed: 0
adserve_cache function(validate)
Cache function 'ad_cache_none_validate' does not exist.
Memory usage: 13,694.523 K
Invoking cache function 'adserve_cache_validate'.
Validated ads: '0'.
adserve_invoke_hook hook(filter) action(intersect)
adserve_cache function(hook)
Memory usage: 13,697.109 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'filter'.
Invoking 'adserve_hook_filter'.
Filtered ads: '0'.
adserve_invoke_hook hook(weight) action(first)
adserve_cache function(hook)
Memory usage: 13,697.109 K
Invoking cache function 'adserve_cache_hook'.
Invoking hook 'weight'.
Including file: 'C:\wamp\www\CHBA/sites/all/modules/ad/weight/probability/ad_weight_probability.inc'.
Invoking 'ad_weight_probability_cache_filter'.
adserve_cache function(get_cache)
Memory usage: 13,711.898 K
Invoking cache function 'adserve_cache_get_cache'.
ad_weight_probability cache_filter gcd()
Weighted ads: '0'.
adserve_invoke_hook hook(select) action(first)
adserve_cache function(hook)
Memory usage: 13,711.242 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: 13,705.711 K
Invoking cache function 'adserve_cache_display'.
adserve_cache function(increment)
Cache function 'ad_cache_none_increment' does not exist.
Memory usage: 13,709.359 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: 13,714.336 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: 13,713.086 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: 13,713.086 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'exit_text'.
Function 'adserve_hook_exit_text' does not exist.
Memory usage: 13,709.672 K
document.write('\x3c!-- No active ads were found in t2 --\x3e');
It was noted in issue Ad image won't display in block when served with IIS that a similar/related problem was fixed in a development snapshot. Is there a patch in the meantime? Or maybe I'm just missing something obvious?
Any help would be greatly appreciated!
#7
Please upgrade to the 6.x-2.2 version of the module and see if this solves your problem. Issues with path recognition on Windows were solved in that release.
#8
Probably duplicate:
#556402: image ads only display in raw mode
#9
As mentioned in my post, I installed the module 3 days ago. It is the 6.x-2.2 version.
#10
6.x-2.2 was released today, so it would have been rather difficult to install it three days ago.
#11
I assumed ad-6.x-2.2-rc1.tar was what you were referring to. I'll download whatever's latest and see what happens.
Thanks -
#12
Sadly, no such luck. The ads still aren't showing up.
Here's the debug report from .../AAA/sites/all/modules/ad/serve.php?q=1&t=5&u=node%2F46&l=home&debug=2:
ad_dir: 'C:/wamp/www/AAA/sites/all/modules/ad'
debug: '2'
adcache: 'none'
nids: ''
tids: '5'
hostid: ''
url: 'node/46'
alias: 'home'
quantity: '1'
aid: '0'
ad_display: 'javascript'
--> Time mark: 14:27:30
Memory usage: 534.758 K
Drupal bootstrap '0'.
Drupal bootstrap complete.
Root drupal directory detected as 'C:\wamp\www\AAA'.
C:/wamp/www/AAA/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 $
C:/wamp/www/AAA/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 $
C:/wamp/www/AAA/sites/all/modules/ad/adcache.inc:
C:/wamp/www/AAA/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 $
C:/wamp/www/AAA/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: 542.141 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: 545.195 K
Invoking cache function 'adserve_cache_open'.
Drupal bootstrap '8'.
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: 12,554.938 K
Invoking cache function 'adserve_cache_hook'.
adserve_cache function(get_cache)
Cache function 'ad_cache_none_get_cache' does not exist.
Memory usage: 12,556.734 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: 12,561.281 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: 12,558.133 K
Invoking cache function 'adserve_cache_id'.
adserve_cache_id: type(host) id()
adserve_cache_id: unsupported type 'host'.
Searching tids: 5
adserve_cache function(id)
Memory usage: 12,558.133 K
Invoking cache function 'adserve_cache_id'.
adserve_cache_id: type(tids) id(5)
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(5)
adserve_cache_id: Ad '95' failed access check.
Total ads: '0'.
Already displayed: 0
adserve_cache function(validate)
Cache function 'ad_cache_none_validate' does not exist.
Memory usage: 13,299.898 K
Invoking cache function 'adserve_cache_validate'.
Validated ads: '0'.
adserve_invoke_hook hook(filter) action(intersect)
adserve_cache function(hook)
Memory usage: 13,302.484 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'filter'.
Invoking 'adserve_hook_filter'.
Filtered ads: '0'.
adserve_invoke_hook hook(weight) action(first)
adserve_cache function(hook)
Memory usage: 13,302.484 K
Invoking cache function 'adserve_cache_hook'.
Invoking hook 'weight'.
Including file: 'C:\wamp\www\AAA/sites/all/modules/ad/weight/probability/ad_weight_probability.inc'.
Invoking 'ad_weight_probability_cache_filter'.
adserve_cache function(get_cache)
Memory usage: 13,316.781 K
Invoking cache function 'adserve_cache_get_cache'.
ad_weight_probability cache_filter gcd()
Weighted ads: '0'.
adserve_invoke_hook hook(select) action(first)
adserve_cache function(hook)
Memory usage: 13,316.117 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: 13,310.586 K
Invoking cache function 'adserve_cache_display'.
adserve_cache function(increment)
Cache function 'ad_cache_none_increment' does not exist.
Memory usage: 13,314.313 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: 13,319.250 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: 13,318.023 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: 13,318.023 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'exit_text'.
Function 'adserve_hook_exit_text' does not exist.
Memory usage: 13,314.609 K
document.write('\x3c!-- No active ads were found in t5 --\x3e');
Drupal 6.14
- Settings: defaults
- ad of type 'image' is created
- ad is assigned to group
- ad is marked 'active'
- ad block (group block, not default) displays in template, but no ad found ("Failed to load source for: http://127.0.0.1/AAA/sites/all/modules/ad/serve.php?q=1&t=6&u=node%2F46&l=home")
Ad modules installed:
- Ad
- Ad Report
- Ad Weight Probability
- Image Ad
If there's anything else I can tell you, let me know.
#13
Here's the issue:
adserve_cache_id: type(tids) id(5)
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(5)
adserve_cache_id: Ad '95' failed access check.
It seems you currently only have created 1 ad with a tid of 5 (the ad has a nid of 95), however you do not have permission to view this ad. Be sure to grant the appropriate permissions.
#14
I'm a super admin.
The session id that's being served up by drupal bootstrap '8' in serve.php results in an anonymous uid '0' being pulled from the session table, whereas in the site itself the session id is correct.
Any ideas?