I have just upgraded to 5.x-2.7 today and found an odd quirk which i think is in adsense injector (however I'm not ruling out other modules misbehaving since I upgraded many). Though I'd report the oddity in case others are seeing the same.
When I enable adsense-injector, at all - no matter what, if I use div's to enclose the ads are no ads at all - content on the front page (and in views) has the teaser list repeated twice. In the case of full posts showing on the front page, the post is posted twice.
I am also using the "readmore" tweak, however disabling this makes no difference, and I use "!--break--" to ensure that some posts go in full view on the front page. (So each post has that somewhere).
I checked that everything is ok under "input formats" and adsense tag is checked there.
Visually when you look at the front page, content is repeated - but when you read source it is not.
<div class="content">
<!-- google_ad_section_start -->
This is where my post goes. Text looks fine here. Only once. All tags are closed.
End of post
<br><!--adsense: cached-->
<div class="adsense">
<script type="text/javascript"><!--type and style of advert that shows up OK
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<!-- google_ad_section_end --> </div>
Since I am not using Image attach, I don't want to use the dev-only (so far) Module Weight on my site, and am not using that, but I don't think this has anything to do with image styling for example. My skin (zen actually) is up to date but I'll have a look there as well.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | adsense-injector-double-teaser-output-fix-354985-15.patch | 776 bytes | mcurry |
Comments
Comment #1
Dabitch commentedCorrection: I misread source - the text is repeated twice even when you read source but I see no reason as to why this should be.
Running with "readmore" tweak module turned off and another skin enterily produces the same results. Only when I turn off adsense_injector does it stop repeating on the front page (and some views). I can reove the "node body insertion" setting and I'll still have posted content repeating on the front page despite the fact that I am not showing any ads there.
Comment #2
Dabitch commented---- hmmm, I seem to have managed to set this under "patch" when I have not submitted one at all, fixing status with this post. (sorry)
Comment #3
tenouk commentedi got the same problem after apply the new adsense injector module
all blog and page on the frontpage show twice...
the problem seem come from adsense injector module... if i'm disable the module... everyting look normal....
http://nossdutytask.com/
Comment #4
Rhino commentedI have the same issue with adsense injector 5.x-2.7 using any theme. So it is the module, not the theming.
I'm not using the read more module.
The previous adsense injector module worked fine, how do I downgrade back to that? Just pop the old module back in the modules folder?
Comment #5
Dabitch commentedJust replace the newr version with the older one and run update.php
While sorting out other module upgrades, I dropped AdSense Injector 5.x-2.6 (2008-12-16) adsense_injector.module into my modules location, deleting the new version, and ran update.php
Adsense injector now works just like it should again.
Comment #6
nascimbeni commentedSame problem here - News articles and page on the frontpage show twice with Adsense 3.0 ( non beta )
I tried to go back to Adsense Injector 2.6 but no ad was showing - Treidn again with 2.7 ....At the end I deactivated Adsense injector after a couple of hour fighting with it ...
PS How do I run update.php ??
Paolo
Comment #7
Rhino commentedhttp://yousite.com/update.php should run update.php for you
I de-installed the module before installing an older version, then I ran update.php and it worked.
Any clues as to why this double-posting bug is happening?
Comment #8
Amon_Re commentedI've been hit by the same bug, the mentioned work arround doesn't seem to work, it happened with both 5.x-2.7 as the latest dev version.
Tried disabling it, downgrading to 2.5, run update.php & update again, and it still would show twice.
Anyone have some further idea's?
Comment #9
cantidubi commentedHe comprobado que quitando el %teaser funciona correctamente, lo he dejado así:
I have found that removing the %teaser working properly, so I have left:
<br class="clear"/>[adsense:468x60:0123456789]Comment #10
hswong3i commentedPlease try with following procedure during upgrade/reinstall:
Please let me know if this still can't help.
Comment #11
Dabitch commentedI have upgraded my way past this issue, am on Drupal 6 now. But thanks for the suggestions.
Comment #12
suarkuyak commentedThanks cantidubi at #9. Your suggestion works for me.
Comment #13
mcurry commentedMoving to 6.x dev, since 5.x is no longer supported.
Comment #14
mcurry commentedI'm going to close this since it's been inactive for so long. If it's still a problem, please re-open and provide a URL where I can see the problem demonstrated.
Comment #15
mcurry commentedI was able to reproduce this problem on an old Drupal 5 site, so it's a valid problem.
I was able to fix the problem by changing this line:
to this:
in adsense_injector.module,
function adsense_injector_nodeapi(...)I'll investigate in the D6 branch and back-port any patches to the 5.x branch.
Comment #16
mcurry commentedMoving back to 5.x-2.x-dev branch for patch submission.
Comment #17
mcurry commentedHere's a patch for 5.x-2.x-dev based on comment # 15 above.
I'm going to commit it immediately so there will be no community review.
Comment #18
mcurry commentedCommitted to 5.x-2.x-dev. Drupal 5.x users please use the latest -dev build dated after this comment.
Marking as to be ported so I can fix it in 6.x and 7.x as needed.
Comment #19
mcurry commentedLooks like the patch doesn't need to be ported to 6.x and 7.
Comment #20
mcurry commentedComment #21
mcurry commentedEven though the 5.x branch is no longer officially supported, here's an official release build 5.x-2.8 containing the fix.
If this doesn't work, reopen this issue but keep in mind that I won't do much (if anything) on the 5.x branch from here on out. I will accept community patch submissions and apply them to the source tree for testing, though.