admin-ajax.php
-
Hi,
Enabling the adsense settings appears to cause the adsense markup to be prepended to json responses returned by admin-ajax.php.
-
Hi ecaloshay,
thanks for reaching out.
If you are using Advanced Ads only then this is unlikely, unless caused by another plugin.
If you are using Advanced Ads Pro with AJAX cache-busting then you might indeed see an AJAX request.
If Pro or another add-on of ours is involved them please reach out to me through email support.
Thanks,
ThomasHi Thomas,
That’s interesting. I’m not using Pro, but when I added the ID to the AdSense account field and hit save (Connect didn’t seem to be working at the time), the admin-ajax call response would have the JSON response but above it, the script tag containing the AdSense fragment would be inserted as well.
Clearing the Adsense account field and re-saving resolved the issue, and I attempted this several times trying to determine what was wrong. I even went so far as disabling all other plugins aside from Unyson (the modules were triggering admin-ajax which is how I was reproducing the problem) and the problem still persisted.
In the end, after restoring my other plugins, I deleted and reinstalled Advanced Ads and the problem seems to have gone away.
For reference, in case this crops up again, are you able to advise which hooks/filters output the Adsense fragment? I can then try to diagnose whether there may be a conflict.
Thanks
Hi ecaloshay,
thanks for your detailed reply.
I was misinterpreting your first message then. Advanced Ads does indeed use AJAX calls in the backend, I thought you referred to something in the frontend that only happened after connecting to AdSense.
Did you use a previous version of Advanced Ads before and this could have been an issue tied to an older JavaScript file?
If not, do you happen to have a screenshot or the output and could send it to me via email support? I would definitely like to learn more about this.
Thanks,
ThomasHi ecaloshay,
are you still experiencing the problem or was it maybe just a temporary issue with caching?
Thanks,
ThomasHello,
I’d downloaded the plugin (for the first time) the hour before I redownloaded it to see if it would resolve the issue. So I don’t think it was a version problem.
And unfortunately I didn’t get a screenshot of it happening, but it was basically the standard admin-ajax json response (success in this case) just happened to have the Advanced Ads adsense javascript before it, which caused the response to fail.
But will send you the screenshot/output to email support if it happens again.
Thanks for getting back to me. 🙂
The topic ‘admin-ajax.php’ is closed to new replies.