It doesn't look like this problem was reported - I will confirm the bug as described here, although I'll just bail on the module for now:
Had the site looking great; after installing AdSense attached images would display below text, despite proper CSS inline styling.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | adsense_help.txt | 8.91 KB | bcobin |
| #2 | without_adsense.jpg | 48.2 KB | bcobin |
| #2 | with_adsense.jpg | 54.94 KB | bcobin |
Comments
Comment #1
kbahey commentedYour chance of getting this fixed are far better if you
a) attach a screen shot with and without adsense.
b) list the relevant css you used.
Comment #2
bcobin commentedAnd so I shall!
Here's the relevant CSS - from /image/contrib/image_attach/image_attach.css:
The
display:inlinestyling is not in core; I added that manually; to no avail. This is on a local test site; I can't fool around on the live site. Thanks in advance for looking into this - it's pretty much a show-stopper for me.Comment #3
kbahey commentedWell, adsense does not add its own css file that may conflict with other styling that you have done.
There are a bunch of
<div style=...></div>but that is only when you display a placeholder, and should only affect the ad itself.The only advice I can offer is that you use FireFox's Firebug extension to see what exact styling you have for these elemets with the adsense module and without it, and that will help you narrow down where the problem is.
Comment #4
bcobin commentedI am using Firebug. It's not a styling issue per-se - it looks like AdSense is transposing the first paragraph of node content with attached images. Note where the text "Friday, February 15th," etc. appears in the output of each instance.
Bizarre. I would say this definitely qualifies as a bug - can't think of any reason why you'd want the module to do this.
The code makes it clear the browser is doing exactly what it's told. Eep.
Comment #5
kbahey commentedWhat I see is that Adsense adds the section targeting comments
<!-- google_ad_section_start -->. That should have no bearing on CSS or anything related to presentation.But, the order of things is different in two cases:
With Adsense:
1. section targeting comment.
2.
<p>with text after it.3.
<div>for image attach.Without Adsense:
1.
<div>for image attach.2.
<p>with text after it.That reordering is not done by Adsense. It may be that image attach is messing up things, or the sequence each module is called (controlled by Drupal) is causing this.
You can try two things:
1. Try going into adsense's settings, under Advanced, and uncheck section targeting.
2. Install this module http://drupal.org/project/moduleweight and change the order of adsense and image_attach one way then the other way and see the effect.
Comment #6
bcobin commented1. Probably not possible on the test (local) site. I'm fairly certain that Google won't generate an ID for an IP-only local site.
2. Yes, this works. Setting the Image_attach module to a lighter weight than Adsense solves the problem.
I would say that this is worth looking into - it shouldn't behave this way.
Thank you for your help! I LOVE the Drupal community... keep up the great work!
Comment #7
kbahey commentedDrupal determines the order in which modules are called.
Because the adsense module starts with the letter "a", while image_attach starts with "i", then Drupal calls adsense first when inserting stuff in content.
There is no way to have a generic solution that will work on all sites with all module combinations.
I think this should go in the documentation.
Can you please spend a few minutes writing the solution in the adsense_help.inc file and attach it here (as a .txt file)?
Comment #8
bcobin commentedMy pleasure. See text file, attached. Do with it what you will and thanks!
Comment #9
kbahey commentedThanks for this.
Included with some expansion.
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.