New link in a popup
-
Hello
Since the last version “Version 3.9.3” if in the link I put _blank the link is open in a popup and not in a new tab as usual 🙁
Thank you for help ( I’m going back to the Version 3.9.1 and it’s good )
-
target=”_blank” doesn’t open links in a popup.
Some browsers open it in a new screen though. Perhaps that’s what’s happening?Yes normaly it did … But in this case it really open in a popup windows 🙁
On the same page for some ads it’s open in a new tab and for some other at a differente place open in popup
Can I send you the web adress in a private message ?
thank you
Through here: http://www.adrotateplugin.com/contact/
I also noticed this new behaviour. It seems to be caused by class=”gofollow”. It causes ads to be popup blocked by most browsers, rather than opening in a new tab like they were doing before.
Thank you so much jbx … because lately I thought I was crazy
🙂 I’ve posted a separate question too before I noticed your post.
Just solved it temporarily with a hack, until the author gives us a proper solution.Edit the plugin code and in adrotate-output.php comment out this part:
if(preg_match('/<a[^>]+class=\"(.+?)\"[^>]*>/i', $banner_output, $regs)) { $result = explode(" ", $regs[1]); $result[] = "gofollow"; $result = implode(" ", $result); $banner_output = preg_replace('/class=\"(.+?)\"/i', 'class="'.$result.'"', $banner_output); } else { $banner_output = str_replace('<a ', '<a class="gofollow" ', $banner_output); }Make sure you comment out up to the right curly bracket.
Seems to have solve the issue for me, although it might be affecting clicktracking, so maybe the plugin author will give us a proper solution eventually.
gofollow doesn’t direct browsers to open things in a new window so that makes little sense.
What’s more likely is that with this hack you break the clicktracking thus the javascript redirecting people doesn’t work at all 😉I know it doesn’t make much sense. But I removed it and suddenly its working again normally. I know clicktracking will stop working, but the issue of adverts being blocked was much worse for me.
It could be that the javascript that is acting on links with the class
gofollowis doing something that is causing browsers to open the links in a new window rather than a new tab.I don’t know, but something definitely changed in one of the most recent releases because ads (the same ones, so nothing changed from that side) suddenly started behaving like this and getting blocked.
Well ads were always blocked to some extent. That’s very much beyond my control and it appears the adblockers work just fine. And so does AdRotate. It’s hardly a new “issue” for publishers.
All I can do is try to use generic names and stuff to try and fool them. Cat & Mouse.
If you know of a better classname, let me know.Well, Ads are blocked only if they open by themselves. If the user explicitly clicks on a link, the user wants that page to open. If this wasn’t like that even google’s revenue stream (Google Ads) would not work any more. I am sure its not the classname.
I did a bit of more research and I think I know the real cause of this.
In
jquery.clicktracker.jsthere is this:jQuery.ajax({ url: location.protocol + '//' + location.hostname + '/wp-content/plugins/adrotate/library/clicktracker.php', data: 'track='+track }); setTimeout(function() { window.open(href,(!target?"_self":target)); },300);So what is happening is that, even if the user is explicitly clicking on the link, the popup is opening up 300ms afterwards, so the browser thinks its one of those annoying popups that come up automatically, ignoring the fact that the user clicked on it 300ms before, because they are separate events.
If you look at this here, http://stackoverflow.com/questions/15818892/chrome-javascript-window-open-in-new-tab
Point 3 of the answer that was given seems to confirm this too.Maybe what we just need is to invert the two, perform the normal
window.openin the same event handler, and just perform the Ajax call withsetTimeoutI have tried to invert them and it seems to solve the issue.
window.open(href,(!target?"_self":target)); setTimeout(function() { jQuery.ajax({ url: location.protocol + '//' + location.hostname + '/wp-content/plugins/adrotate/library/clicktracker.php', data: 'track='+track })},300);However I noticed that the AJAX call to the clicktracker is actually not working anyway (also in the original plugin code).
In the Javascript console I am getting this:
GET http://mydomain/wp-content/plugins/adrotate/library/clicktracker.php?track=OTQsMSwwLDA= 404 (Not Found)Not sure whether it is because the tracker ID has an
=which needs to be converted to the HTML entity value, or because of something else.Your edits don’t work at all actually. Not for me anyway.
If I remove the timeout it does work –
jQuery.ajax({ url: location.protocol + '//' + location.hostname + '/wp-content/plugins/adrotate-pro/library/clicktracker.php', data: 'track='+track }); window.open(href,(!target?"_self":target));Also I don’t experience the blocking of ads on any of my computers. Nor do they open in new windows or popups or any of that. they open in new tabs. As intended.
How does removing the timeout work for you?
Hi Arnan,
When you say they do not work at all, in what sense? For me it works. I just swapped the two lines so if one works the other should. Any Javascript error in the console or anything that indicates what didn’t work?
It works for me, you can see it here: http://www.eve.com.mt
http://www.eve.com.mt/wp-content/plugins/adrotate/library/jquery.clicktracker.js?ver=0.1When you’re testing make sure your popup blocker is enabled and check that you didn’t choose to allow popups for the server you’re testing on some time in the past. If you’re testing on localhost or a server you’ve been testing on for a long time it could be you allowed popups or something.
In my case, it wasn’t just my browser, it was advertisers who complained that suddenly their ads were being ‘blocked’. I replicated it on both IE 11, Chrome 32 on windows and Chrome 32 on Ubuntu.
I will try your recent solution, it should work too without the setTimeout. Jquery AJAX is async anyway so there isn’t the need for it.
One other thing you might want to look at before you issue an update is why the clicktracker.php is responding with Error 404. For some reason it is not recognising the tracker ID or something.
Just tried your code seems to work fine too. (My snippet above was OK too, but there is no need for a timeout).
The only pending issue is the track Id which is not being recognised by the clicktracker.php script.
Your idea indeed didn’t work. The JS was triggered (alert window in debug) then i got redirected as intended but the php wasn’t ran. No errors. It’s like it just skipped the php file. My guess would be since the user is directed away from the site before the Php runs it doesn’t execute that.
The clicktracker.php works for me 🙁 on all my computers/servers.
the ‘=’ is just a filler for the silly base64 encoding. Without a & char behind it should not cause trouble. Never has.Does the file have the right permissions and ownership for you?
A few users reported the ownership was wrong for them.
The topic ‘New link in a popup’ is closed to new replies.