Not sure what can be done about this, but when the following conditions are true:

  • Site caching is enabled
  • An administrator or any other user who a member of a role having the "block adsense" role permission edits node content containing an inline [adsense:format:group:channel] tag (adsense filter)

Normal site users will see cached content including the adsense placeholder content - because, the content was generated and put in the Drupal cache when a user who triggers the placeholder insertion views the edited content. This problem persists until the drupal cached content is expired and a non-placeholder user re-renders the pages in question.

The only workaround I've found is to either disable caching, or, remove the "block adsense" role attribute for the users who are editing content (not possible for the admin user, as the adsense module always displays the placeholder for uid=1)

I'm not sure if this is fixable for inline content - unless the adsense module can detect that it's being used in a node's content, I'm not sure how to ensure that an "placeholder" isn't stuffed into the drupal cache.

Perhaps one way to fix this (sub-optimal IMO, but would work as an expedient measure) is to never render the placeholder when rendering the [adsense:] filter's output.

Comments?

Has anyone else seen this problem?

Comments

mertero’s picture

I see the same. But I have my cache disabled!

It's like I have no way to include an AdSense tag and see actual ads and not placeholder.

mcurry’s picture

I've found that you may need to manually clear the cache even if you don't have site caching enabled. I have the cache disabled on my site, but I found a bunch of stuff still in the cache - remember, it's possible for a module to make use of the cache even if you disable caching. If you can run a SQL query against your database, do this:

select * from cache where cid like '%adsense%';
select * from cache;

You should clear the cache manually like this:

delete from cache;

(Please note that the above examples assume that you are not using a prefix on the table names. If you are, substitute your table prefix names as appropriate.)

mertero’s picture

Inactivist,

Thanks for your help. I tried clearing my cache, and it didn't make any change. In fact, I removed all records from the cache table, it's now empty, but still I see the AdSense placeholder.

Any more ideas, please?

mcurry’s picture

Try these things:

  • Ensure that your adsense settings do not include "disable adsense" or other conflicting options - (admin/settings/adsense/Advanced Options/Disable Google Adsense and Enable Test Mode should be unchecked.)
  • Log out of all sessions on your web site - especially admin user sessions
  • Close all browser instances
  • Clear the drupal site cache using the sql query delete from cache;
  • Start your browser
  • Clear browser cache (method of doing this will depend on your browser)
  • Visit your site but do not log in - visit your site as a visitor (guest) would
  • While viewing your site's pages that include google ads, refresh your browser window by holding down the ctrl key and clicking the refresh button, or hit ctrl-F5

What happens? Do you see the placeholders, or ads?

mertero’s picture

inactivist,

I tried all of this... The AdSense module is enabled okay, I'm loggin as a guest, from 3 different browsers, and it's all the same - placeholder.

:-(

R.

kbahey’s picture

Mertero,

If you want some help with this, you can contact me here http://drupal.org/user/4063/contact

Be prepared to change the admin password and give me access to your site if needed so I can see what is happening.

mertero’s picture

kbahey,

Wow, thanks for the suggestion. I sent you the details in mail.

Ron.

darren oh’s picture

Status: Active » Closed (duplicate)

Duplicate of issue 41768. Excellent description of problem, though!