Running drupal 4.6.6 with adsense module 4.6.0 ... I uploaded the module, enabled it, and then when I go to settings I entered my adsense account. I created a block and put in the code
<?php
if (module_exist("adsense"))
{
print adsense_display("120x600", 2, 4);
}
?>
Nothing is displayed, except the name of the block.
I created another block and put the google generated code in and it works as expected.
When I view source the area of the adsense module block says
<div class="block block-block" id="block-block-2">
<h2 class="title">adsense</h2>
<div class="content"><!--adsense: page not in match list--></div>
</div>
Both the adsense module and the block are set to show on every page except listed pages. Even when I change that setting and specify it to show on it still shows the same thing in the source code.
Any ideas ?
Comments
Comment #1
kbahey commentedDid you check this issue?
http://drupal.org/node/39516
Comment #2
drewage commentedI did not see that issue...I didn't know the default issue view filtered closed issues. Those settings did not make any change...I thought it was hard coded to not display on admin pages ? Of interest to me is that if I disable adsense in the settings it does show the placeholder box.
Comment #3
kbahey commentedAds do not show up for someone if they are logged in as the admin. This is the expected behavior by design.
However, from what I understand, you are saying that you get:
<!--adsense: page not in match list-->This means that the problem is in the settings. You have to select " Show on every page except the listed pages", and leave the pages empty, so it would show everywhere.
I am using this version:
//$Id: adsense.module,v 1.25.2.8 2006/01/15 20:42:57 kbahey Exp $Comment #4
drewage commentedI have selected that option to "Show on every page except the listed pages" and the box is empty now. As an anonymous user I get the
I am using version //$Id: adsense.module,v 1.25.2.11 2006/03/12 19:33:23 kbahey Exp $
Comment #5
kbahey commentedDid it work or did it not?
You say: "As an anonymous user I get the I am using".
Seems something is missing.
If it works, then close this issue.
Comment #6
drewage commentedIn an attempt to get clean urls to work I decided to install Apache for windows. With Apache serving the pages, the adsense module works. With IIS serving the pages it does not.
Comment #7
Gurpartap Singh commentedI think administers don't get to see the ads..
Comment #8
glennpratt commentedI'm seeing this bug as well on Druapl 4.7.2. I have visibility set properly, I see a placeholder when logged in, but I see no page match when logged out.
I'm also using IIS, so that may be the link. I'll try to check this on an apache site I have later.
Comment #9
Anonymous (not verified) commentedI am having the same issue running IIS on Windows Server 2003.
I am getting the message "adsense: page not in match list".
Has anyone been able to work out why this is happening?
Comment #10
kbahey commentedAlso see http://drupal.org/node/79947
Comment #11
csc4 commentedI'm one of the IIS crowd and I seem to have two distinct problems.
If I don't comment out the HTTPS check I only ever get the
<!--adsense: page not in match list-->Having commented that out, I do get a block but the ad id doesn't seem to be stripping the one line text description information from the database field - so it tries to pass to Google
google_ad_client = "s:20:"pub-4298868154457574";"So I changed line 612 to
$client = unserialize(adsense_get_client_id());Deleted the cached ad and I have Google ads!
Comment #12
kbahey commentedcsc4
I understand the HTTPS part, and that can be an Apache vs. IIS thing. I don't understand why the unserialize part is necessary, but ...
If you can make a patch out of your changes, then I can include it as a conditional on IIS being detected in PHP, then everyone benefits.
See http://drupal.org/patch on how to create a patch.
Comment #13
delay commentedcsc4's changes worked for me using IIS and win 2003. The unserialize part was not necessary for me. I only needed to comment out...
Comment #14
kbahey commentedCan someone running IIS create a file with the following in it, and then run it for me?
Save this to a file called t.php and then place it in the same directory as your index.php, and then point your browser to it, and paste here the output it gives.
This will help me detect IIS and fix this issue.
Comment #15
kbahey commentedForget that.
I will just make that check if it is Apache only.
Attached is a 4.7 version of the module that should work on IIS without any patches.
Can people with IIS please test it and report back here?
Comment #16
kbahey commentedCommitted to TRUNK and 4.7.
Comment #17
(not verified) commented