Adsense injector works for blogs, pages but not stories

Thomasr976 - March 3, 2009 - 04:54
Project:Adsense Injector
Version:6.x-2.7
Component:Code
Category:support request
Priority:normal
Assigned:hswong3i
Status:duplicate
Description

I workinging in Drupal version 6.9 and installed the Adsense and Adsense injector mods as follows:

AdSense Click Tracking 6.x-1.0
AdSense core 6.x-1.0
AdSense Injector 6.x-2.7
CSE Search 6.x-1.0
Managed ads 6.x-1.0

I've create ads yesterday and have configured them in the Adsense Injector mod to insert below the teaser and at end of node.

<div style="float: right; margin: 0; padding: 0 1em .25em 0;">[adsense:250x250:xxxxxxxxx]</div>%body<br class="clear"/>[adsense:468x60:xxxxxxxxxxx]

All page, blogs show fine but not stores. I can not figure out why. View source does give any clues. Any ideas in what may be wrong?

#1

Thomasr976 - March 5, 2009 - 06:07

anyone?

#2

Michael Curry - March 5, 2009 - 06:59
Status:active» postponed (maintainer needs more info)

Try the following, one at a time:

- Look in the HTML source of the rendered page for any HTML comments from adsense_injector (will tell you if word count is too low)
- Disable all non-core modules other than adsense core and adsense_injector
- Verify that you have enabled adsense_injector on the node types in question
- Verify that you can use [adsense:xxx] tags in node content for the node types in question (manually insert adsense into the node body using the adsense block syntax you've used in the adsense_injector template - thus bypassing adsense_injector. ) Does that work?
- Are you trying to view ads using the administrator account? Adsense module blocks ads for administrator. View the page as guest (disable site caching first).

Basically, you must verify that the base adsense module works on the node type, URL, input format, etc. for the nodes you are having problems with.

#3

Thomasr976 - March 5, 2009 - 16:29

I have done all of the above except disabling all contributed nodes. When I inserted the same Adsense tag [adsense:xxx] into the story node and viewed it as an anonymous user, the adsense ad was visible. No clues from Views; also these nodes are quite wordy.

I'll try disabling the contrib mods next.

#4

Thomasr976 - March 5, 2009 - 17:58

I disabled all contributed mods except Admin and logged off. The inline Ads appeared so it's one of the contributed modules. Does any body have an idea of which mods could cause a problem with the Adsense Injector and Adsense Module?

#5

Thomasr976 - March 5, 2009 - 18:49

Ok I found the problem. It was the Contemplate Module. I accidently checked the body section of this module and of course there was nothing in there that called up the google adsense. When I unchecked it, the ads showed correctly.

Inactivist, many thanks for your advice on how to trouble shoot this issue. It really helped and I am in your debt.
Tom

#6

dabellator - March 5, 2009 - 22:28

are you saying you are now able to have the injector working with teasers made from views? I thought that wasn't possible, am I missing something?
-JB

#7

Thomasr976 - March 5, 2009 - 22:47

Sorry that's not what I meant. I am saying that in my template for the Story node that I accidently checked or enabled the body portion and it showed the following code:

<div class="field field-type-image field-field-image">
  <h3 class="field-label"></h3>
  <div class="field-items">
      <div class="field-item"><?php print $node->field_image[0]['view'] ?></div>
  </div>
</div>
<?php print $node->content['body']['#value'] ?>

Need help on this subject or have other questions? Post your question in <a href="/forum">our Forums</a> where it will be answered shortly.

When I disabled the body portion. The Adsense ads were inserted and visible.

Now that I think about it this behavior is very weird. Perhaps it is a bug. I can tell you it does not happen in my other Drupal site running version 5.15. There I have the body portion of the template enabled and the inline ads appear just fine. The same code above appears on site running 5.15. Seems like with version 6 of Adsense and Adsense Injector that one one might have to add the google adsense code from the body part of the template to get the inline ads to appear.

I will try this later. Hope this helps and thank for your question.

#8

Michael Curry - March 5, 2009 - 23:00

You might want to be sure that your module weights are set correctly - adsense injector may need to be last (or before?) contemplate. Unfortunately, this is one of those things you will have to tweak via sql queries or other means. (I think there is a module weights module that lets you set this from the admin pages.)

#9

Thomasr976 - March 6, 2009 - 00:38

Module weight?? First time I am hearing about this. I will try the one you suggested. Have you observed this behavior in the current version or in earlier versions of Adsense and Adsense Injector? Thanks again for your help.

#10

Michael Curry - March 6, 2009 - 03:08

http://drupal.org/node/110238
http://drupal.org/project/moduleweight
#123972: Adsense Injector and paging

Yes, we've heard of it before. It depends on other modules and what they do. There is probably no 'one size fits all' solution, I'm afraid.

#11

Summit - May 14, 2009 - 15:24

Subscribing, greetings, Martijn

#12

hswong3i - May 18, 2009 - 02:19
Assigned to:Anonymous» hswong3i
Status:postponed (maintainer needs more info)» duplicate

Same problem as #123972: Adsense Injector and paging caused which is already get fixed. Mark this as duplicated.
Please re-open this issue if problem still happened.

 
 

Drupal is a registered trademark of Dries Buytaert.