I wanted to use this module with my site, but I found that image ads weren't displaying when using a block in the Right sidebar. I played with the Display type settings and found that Raw would work: none of the others did. I created a new test site with just Drupal, Ad, Image Ad, and Text Ad (eAccelerator switched off). Same problem.
In case it was affected by the Input format bug (which does affect me btw - it was always set to Filtered HTML regardless of how I saved it) I changed the default format to Full HTML, deselected all filters and deleted Filtered HTML but still no luck. Furthermore the image displays on the node's View screen.
A quick View page source on the homepage shows the following.
<div id="sidebar-right" class="sidebar">
<div id="block-ad-0" class="clear-block block block-ad">
<div class="content">
<div class="advertisement group-tids-0" id="group-id-tids-0">
<script type='text/javascript' src='http://td.com/sites/all/modules/ad/serve.php?q=1&t=0&u=node'></script>
</div>
</div>
</div>
</div>
If I run http://td.com/sites/all/modules/ad/serve.php?q=1&t=0&u=node I get:
document.write('\x3cdiv class=\"image-advertisement\" id=\"ad-1\"\x3e\x3ca href=\"http://td.com/ad/redirect/1/0?url=node\"\x3e\x3cimg src=\"http://td.com/sites/default/files/tipaimukh-dam-en.jpg\" alt=\"imagead\" title=\"imagead\" width=\"150\" height=\"174\" /\x3e\x3c/a\x3e\x3c/div\x3e');
If I extract the image URL from there, and put http://td.com/sites/default/files/tipaimukh-dam-en.jpg in the address bar, the image loads fine. Here's the debug output:
ad_dir: 'D:/virtual/td.com/sites/all/modules/ad'
debug: '2'
adcache: 'none'
nids: ''
tids: '0'
hostid: ''
url: 'node'
quantity: '1'
aid: '0'
ad_display: 'javascript'
--> Time mark: 15:39:18
Memory usage: 476.758 K
Drupal bootstrap '0'.
Drupal bootstrap complete.
Root drupal directory detected as 'D:\virtual\td.com'.
D:/virtual/td.com/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 $
D:/virtual/td.com/sites/all/modules/ad/adserve.inc: // $Id: adserve.inc,v 1.1.2.31.2.8.2.8 2009/05/07 13:52:13 jeremy Exp $
D:/virtual/td.com/sites/all/modules/ad/adcache.inc:
D:/virtual/td.com/sites/all/modules/ad/ad.module: // $Id: ad.module,v 1.2.2.29.2.83.2.16.2.26 2009/08/05 00:13:36 jeremy Exp $
D:/virtual/td.com/sites/all/modules/ad/ad.install: // $Id: ad.install,v 1.2.2.4.2.27.2.7.2.4 2009/04/03 17:01:02 jeremy Exp $
adserve_cache function(get_ad_ids)
Cache function 'ad_cache_none_get_ad_ids' does not exist.
Memory usage: 482.742 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: 486.633 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: 7,136.305 K
Invoking cache function 'adserve_cache_hook'.
adserve_cache function(get_cache)
Cache function 'ad_cache_none_get_cache' does not exist.
Memory usage: 7,138.625 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: 7,139.320 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: 7,134.266 K
Invoking cache function 'adserve_cache_id'.
Unsupported type 'host'.
Searching default: 0
adserve_cache function(id)
Memory usage: 7,134.508 K
Invoking cache function 'adserve_cache_id'.
Total ads: '1'.
Already displayed: 0
adserve_cache function(validate)
Cache function 'ad_cache_none_validate' does not exist.
Memory usage: 7,135.461 K
Invoking cache function 'adserve_cache_validate'.
Validated ads: '1'.
adserve_invoke_hook hook(filter) action(intersect)
adserve_cache function(hook)
Memory usage: 7,138.414 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'filter'.
Invoking 'adserve_hook_filter'.
Filtered ads: '1'.
adserve_invoke_hook hook(weight) action(first)
adserve_cache function(hook)
Memory usage: 7,138.477 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: 7,138.625 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: 1.
adserve_cache function(validate)
Memory usage: 7,141.836 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: 7,131.063 K
Invoking cache function 'adserve_cache_display'.
adserve_cache function(display_ad)
Cache function 'ad_cache_none_display_ad' does not exist.
Memory usage: 7,135.977 K
Invoking cache function 'adserve_cache_display_ad'.
Ad type 'image', loading module 'sites/all/modules/ad/image/ad_image.module'
ad: <div class="image-advertisement" id="ad-1"><a href="http://td.com/ad/redirect/1/@HOSTID___"><img src="http://td.com/sites/default/files/tipaimukh-dam-en.jpg" alt="imagead" title="imagead" width="150" height="174" /></a></div>
adserve_cache function(increment)
Cache function 'ad_cache_none_increment' does not exist.
Memory usage: 7,692.383 K
Invoking cache function 'adserve_cache_increment'.
adserve_cache_increment action(view) aid(1) hostid()
Drupal bootstrap '8'.
Drupal bootstrap complete.
adserve_invoke_hook hook(increment_extra) action(merge)
adserve_cache function(hook)
Memory usage: 7,698.523 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()
--> Time mark: 15:39:19
Memory usage: 7,692.625 K
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: 7,696.344 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: 7,696.516 K
Invoking cache function 'adserve_cache_hook'.
Did not find hook 'exit_text'.
Function 'adserve_hook_exit_text' does not exist.
Memory usage: 7,692.031 K
document.write('\x3cdiv class=\"image-advertisement\" id=\"ad-1\"\x3e\x3ca href=\"http://td.com/ad/redirect/1/0?url=node\"\x3e\x3cimg src=\"http://td.com/sites/default/files/tipaimukh-dam-en.jpg\" alt=\"imagead\" title=\"imagead\" width=\"150\" height=\"174\" /\x3e\x3c/a\x3e\x3c/div\x3e');
I'm using Apache/2.2.12 (Win32) PHP/5.2.10 and MySQL 5.1.36. Any help would be very much appreciated; please let me know if you need any more info. Thanks for your time.
Andy
Comments
Comment #1
cybershan commentedAnd I got the same problem
Comment #2
cybershan commentedActivate all the modules in AD folder , then I can see the banner.
Comment #3
Funkymoses commentedI'll third this and chip in that in firebug this is what i get for the ad block:
Comment #4
jeremy commentedThis is fixed in the latest development snapshot, and will be in 6.x-2.2.
Comment #6
cbassig commentedThis is occurring for me in the latest released version. I have the ad blocks placed in a panel and the ads are not appearing. Using firebug, I notice the section of the panel is not even being produced. This is occurring for every mode but the Raw.
I tried placing the block in a standard Drupal sidebar instead of a panel and the Ads still come up blank.
Also, tried both Compressed Javascript files and Uncompressed, as well as having all modules enabled based on the suggestion of cybershan. No luck...
Comment #7
yingtho commentedIf you set the permission then it shows the image ad.
Comment #8
cbassig commented@yingtho - Thanks but all permissions have been set. This is not the apparent problem.
Comment #9
ev_rowe commentedFor the record, I'm having the exact same problem with trying to display image ads on my site. I'm running Drupal 6.14 with Ad Module 6.x-2.2
The images ads show up fine in Raw mode but nothing else; javascript and jQuery do not show the ads. As mentioned in several other threads, I'm also having issues with Impression tracking. I've ensured all of the proper modules are turned on and that the correct permissions have been enabled/granted, to no avail. Attempts to access the debug URLs result in a 404 error, so I'm not even able to troubleshoot the problem that way. This was one of the very first modules I added to my drupal install and have been having these problems from the beginning, long before adding additional modules or applying my custom theme. Would greatly appreciate it if someone could get to the root of this problem, and the sooner, the better.
By the way, Jeremy, I do want to mention that I love this module; you've done a fantastic job on it. I just wish the common denominator between those of us affected by this problem could be tracked down!
Comment #10
matshep1 commentedJust for the record. I was having this same issue in Firefox but the ad seemed to be loading in other browsers. I am now kicking myself as I realised that I had Ad Blocker Plus installed in Firefox and it was blocking the image! Doh. So of course I just added my site to the ad blocker exceptions and hey presto.
Just wanted to share in case this might be the issue for other users :)
Good luck,
Matthew
Comment #11
drjonez commentedSame problem. Any luck?
Comment #12
emilyf commentedsame problem. i don't have any firefox add-ons installed, and i can only see ad in raw mode. latest dev version is installed.
Comment #13
J-Chance commentedSame problem here. I dont have any firefox addons either. Raw mode only.
Comment #14
michelleSame issue in Firefox here. No add blockers installed.
Failed to load source for: http://XXX/sites/all/modules/ad/serve.php?q=1&t=1928&u=node%2F24884&l=ads%2Ftest-ad-3Opera and Chrome are working fine. I don't know what "Raw mode" is... Will go investigate that.
Michelle
Comment #15
igorik commentedI have same problem. No image is shown.
The other problem, everytime I am editing the image ad, the field for the url and mouseover text is emptied and I have to write there again target url. (I will add this as another bug)
Comment #16
freestone commentedSame issue here.... Hours of look at this issue and I see no solution. Really want ads to rotate and according to what I read this will not happen with RAW
Comment #17
artar commentedI had this problem, then read on another thread - http://drupal.org/node/597116 #16 - that advertisements will not display at all unless this permission is granted for anonymous users. Changing permissions worked for me, though I'm an admin and they should have been visible in any case - so still a bug.
Comment #18
fluxrider commentedProbably not related but I just installed this module ( 6.x-2.2 )and came looking because I could not get image adds to display . Turns out for me while I had approved the adds I didn't change that to active , so thought I'd throw this suggestion in . After the permissions are given for show adds and view uploads, , and the taxonomy access permissions are given, you have to make sure the adds are 'active' not just approved , for each add. Hope it helps someone.
Comment #19
martidaniel commentedSame problem. For record.
Cheers
Comment #20
elielcezar commentedI´m still having the same problem.
Ads just appearing in RAW mode, without random mode.
Using version 6.x-2.2
Comment #21
worldbridges commentedHaving the same problem here. Just moved a site to a new server and at first it wasn't a problem (apache 2.0/php5.2.9). When I rebuilt apache using apache2.2/php5.3.4, the problem started occurring again. Wondering if there's something in apache or php settings that's causing this.
Comment #22
zdean commentedsubscribe..having same issue.
Comment #23
piyuesh23 commentedhi ppl,
even i had the same issue..just figured it out..checkout your browser, if it has ad blocker installed..disable it and then try again..it worked fine for me..
Comment #24
sleepingmonkchmod the file permissions on serve.php to make sure the file is readable and executable.
Comment #25
spidersilk commentedI'm having the same problem as everyone else here - ads only display in Raw mode.
And no, I am not using any sort of ad blocker; yes, I have permissions set so that anonymous and authenticated users can view ads; yes, all the ads in question are set to active; etc.
But curiously, what I did just discover is that the problem appears to different in different browsers - using Javascript mode, the ads don't show in either Firefox or Safari, but they fail differently in the two browsers: in Firefox, the ad regions collapse completely, showing nothing and distorting the layout of the page, while in Safari, the page layout is OK but where the ads are, I see broken image links (that may just be a difference in how the two browsers handle broken image links, though).
But using Jquery mode, they do show in Safari, just not in Firefox. I checked the HTML source of the page in each browser while using that mode, and it actually appears to be serving up different HTML in each case. Here's what the content of one ad block looks like in Safari:
And here's the content of the same block in Firefox:
Any ideas as to what might be going on here would be most welcome. And no, once again, I do not have any ad-blocking software enabled in Firefox.
Comment #26
spidersilk commentedOK, I've found out a little more of what's going on with Javascript mode in Firefox: I tried the tip in debug.txt about finding the serve.php URL in the page's HTML and seeing if I could open that directly. What I found was that the image path there was wrong: for the ad I was checking, the correct image path should have been /sites/magentamagazine.com/files/fff-web-banner-videorecap-final.gif - but what the Javascript was instead trying to write was /sites/magentamagazine.com/modules/ad/sites/magentamagazine.com/files/fff-web-banner-videorecap-final.gif - i.e. it prefixed the image path with the path to the ad module! Which of course means that the image can't be found.
Does anyone know why it might be doing that, and how to stop it?
Comment #27
spidersilk commentedWow - I must be losing my memory, because with a bit more searching I have discovered that I posted about this same issue (the insertion of the module URL into the image URL) six months ago (#900250: Image ad path is based on ad module directory).
However, as no one ever replied with a solution other than "use raw mode", the issue still stands... There was another issue posted previously about this issue specifically with regard to multisite environments (#227237: Javascript display of image Ads does not work when site is in a subdirectory in a multisite enviroment.), which is the case here, but the patch someone offered there does not appear to work. :-(
Comment #28
Anonymous (not verified) commented@matshep1: Thank you a lot!
After two hours I realized that the problem was caused by Adblock plus FF extension.
Disabling it, everything works.
Comment #29
alfthecat commentedSubscribing
(I use the advertisement module on several sites and I always have set the configurations to RAW. No ads will show if I choose anything other than RAW.)
No blockers or whatsoever installed.
Comment #30
fluxrider commentedWorth checking is TAC. If you have that installed and global view setting set to deny and have not classified each add type with a taxonomy term other than 'default', the ads will only show to no1 user in raw. TAC reads the content as unclassified and blocks it, especially as the last TAC update fixed the bug which allowed in some circumstances the content to show classified or not.
Comment #31
daffie commentedSubscribing
Comment #32
alfthecat commented@fluxrider
Thanks for the suggestion. However I don't use taxonomy access control, in fact I'm not using taxonomy on my ads at all.
Comment #33
bryangullan commentedI've just come across this issue as I was trying to find out why image ads were not showing up.
The issue I had was that the path to the image was of the form http://default/... rather than http://example.com/sites/... (or that without the actual domain included).
I've now got them working, having done the following:
* Ensured I was using jQuery type (this might not be necessary but the 'javascript' type certainly didn't work for me, for other reasons).
* Flushed the ad file cache.
While the above may not work for everyone here, if you've got the file cache enabled, do remember to clear it when trying out different settings (or disable it until all your settings are correct. I don't know exactly what the source of the incorrect path was - possibly related to earlier issues with config - but the cache masked that actually all the settings were correct and working.
Hope that helps someone!
Comment #34
john franklin commentedThe comments in this issue list the ways the ad module can fail to serve an Ad. Here's the quick checklist:
I'm closing this as a dup of the issues cited above, to limit the number of threads where this is discussed and focus each one on a specific aspect of the issue. Please follow up on one of the others.