Hi, I have locally hosted ads running fine with this ad module, but tried to copy and paste a Google adsense Javascript code into the html and the google ads don't display. Also on trying to edit the node with the javascript code caused a white page and the browser to stall whilst loading the page. Tried changing the setting to Raw and got only a box saying "view count". I have filters for full html set. Would love to mix Google Adsense banners with locally hosted banners. Thanks

Comments

jeremy’s picture

Status: Active » Postponed (maintainer needs more info)

I don't use AdSense, so I have no way to test. Patches welcome.

jeremy’s picture

Perhaps related:
#433404: Adsense problem

tjb74’s picture

The white page whilst trying to edit may well be a duplicate. The ads not showing is something else, and perhaps a javascript issue? I cannot create a normal page node and paste the adsense javascript and see the ads either, however using the Drupal adsense module works perfectly, with the ads showing in the blocks immediately. But I want to rotate adsense ads with my hosted ads using the ad module....

brazorf’s picture

I have the following problem; perhaps it will help find out more about the cause.

This is what i tried:

1. Create a HTML ad, using Filtered HTML input format, fill the textarea with the adsense code.
Result: ad wont show at all.

2. Create a HTML ad, using Full HTML input format, fill the textarea with the adsense code.
Result: ad wont show.

3. Create a HTML ad, using PHP code input format, fill the textarea with the adsense code.
Result: ad is correctly showing on the front page, but i cannot access the ad editing page anymore.
What is happening is that i get a full blank screen at the address http://localhost/node/10/edit?destination=admin/content/node.
Anyway, if BEFORE getting back to the editing page i do refresh the frontpage, allowing the ads to show themselves, when i go back to editing page its working again..for just one time. If i want to edit a second time i need to go front, refresh, then back again on edit.

Sometime another thing is happening aswell: edit page is opening, but in the HTML form tab i see nothing, neither i can open or close the tab, and every form control below (status combo boxes and other tabs) is not loaded on the page, it doesnt exists anymore. To make it show again i have to modify directly via database the textarea content, i.e. enclosing content in "" "". In this case i can still edit the ad, but its not showing anymore.

Hope this can help fix the matter.

Regards,
Fabrizio

ctalley5’s picture

same problem here

spookypld’s picture

I'd same problem.

I've got redirection or blank screen or Error:Invalid Address, no matter of HTML input or PHP.

What I've found is weird. Check this out:

<script type="text/javascript">
&lt;!--google_ad_client = "pub-1587915788862352";google_ad_slot = "1457114108";google_ad_width = 468;google_ad_height = 60;-->
</script><script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

If didn't noticed, that < symbol is replaced with HTML name &lt;

I know similar issuewith Blogger. When I tried to inject AdSense code into Blogger posts I've found than nothing shows up. General solution was to change < > and " symbol with HTML name equivalent. I've done it and it worked.

Here we had something similar, but I can't mind why it worked that way.

I'm thinking of Why does AdSense code is like that. I'mean why comments are into <script> ?

If You've got similar problem please review Your's site code and post it here!

Cheers.

p.s. sorry for my English grammar, I forget a lot since my school-years...

edit:
Know I far more concerned. I think this is Drupal issue, or maybe just input format issue. I've changed Default Input Format to PHP and know it is fine. Ads shows.

jenlampton’s picture

Title: Google Adsense ads not showing » HTML Ad converts opening HTML comment tag into &lt;!--

I'm having the same problem, but it's not related to google ads. This happens for any JavaScript add that has a html comment tag within the script tags. You can test with something like this:

<script type="text/javascript"><!--
       this is a HTML comment
//--></script>

and then view the source code when the ad is displayed.

jenlampton’s picture

Project: Advertisement » Drupal core
Version: 6.x-2.1-rc1 » 6.9
Component: ad_html module » filter.module
Status: Postponed (maintainer needs more info) » Closed (duplicate)

Found the problem, it actually has nothing to do with Ad, it's a flaw in htmlcorrector filter. Patch here:
http://drupal.org/node/222926

jenlampton’s picture

Version: 6.9 » 6.x-dev

whoopsie.