New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AdSense Ads randomly stop displaying until refresh page #949
Comments
Can anyone check this problem? It's really important for revenue. Thank you. |
Please provide the code you used (remove sensitive info) as my responsive ad is working and I use async method provided by google.
**Update. After testing this for several minutes, my site stopped responding and I could hardly get it to work. After disabling the google ads, it responded again after clearing cache. We need to test this well and over many minutes to see the issues. |
I can tell you why the website stopped working:
Google Adsense is async, so it loads while the page loads. The problem is that because you need to go from /photo (that doesn't have a block 3) to /, the problem is that while you load, AdSense doesn't find in the actual page the block 3 that the / requires, so it stops working. You can see this by pressing F12 with Chrome and enabling the Developer Console. There is an AdSense error that say that doesn't find enough space to place the Ad. I fixed this in some way placing just an AD in every page in the first column (block 1) as so much pages have the first column at least. Another problem is that after this "solving", sometimes Ads just stop be shown if you browse the site in AJAX mode, so just clicking in-page links, and there isn't any advice by Chrome Console and so on, it seems everything normal and inspecting the Ad it acts like if it has been loaded from the browser, but it doesn't shows up. I hope I've been clear! |
I already marked it a bug before. Please wait for our core developers to check. |
Yes, of course. I just wanted to be more clear to make the problem understand better. Sorry! |
It's ok. I know you are trying to help. Our core devs will check this as I can reproduce an odd issue this time. |
Any news on this? It's really important for revenue if you can pay your hosting just with Ads. |
I tested this issue. But I don't have an approval google adsense. It's very hard for me reproduce.
` <script> $Behavior.googleadsensescript = function(){ (adsbygoogle = window.adsbygoogle || []).push({}); } </script>`Please test on your localhost before do it on your live site. |
Thank you Neil, but I haven't understood which script I have to write inside phpfox.class.php... I tried placing just the Google script in the head (by editing in the admincp the HTML) and just placing, without script, the ins class. For example, in my head I have and in blocks, I have: I say again that with css tricks now I can place ads where I want, but after some time they disappear. If you refresh the page, they appear. Anyway, Neil, if you need I can send you details for logging in my website as admin, via mail, so you can test AdSense. |
@neil96 we need to fix this as we can't have clients editing source files. Clients don't code. We used to be able to do this prior to this release. It is not good if our script doesn't allow things like google. |
@optiroot Could you send me your ads code (from your google adsense account) like this
And valid domain for that ads. Because ads will not display if it put in wrong domain. I will setup vitual host and test on my localhost. Email me (neil@phpfox.com) if you want keep your site info in private. |
@neil96 don't forget I have a live test server and it does have google on it already if you need to test next time. :) |
@Data66PF I can't test now, because I don't have a valid google adsense account now. |
but like I mentioned, I have it enabled at my dev site. You can test there as you have all access. but it is 4.2.2. if it helps |
I've checked this issue. The ads randomly stops display because Javascript in ads has conflict with our core Javascript. It still does not display in next page due to sitewide ajax mode. Original ads code from google:
New code:
|
Sorry, I didn't have time to access on GitHub and so on. In the way you said I can insert ads where I desire, right? Now, the big question: does Google AdSense approve this? I know that we can't change Ads Code... will Google let me keep AdSense or will ban me? Thank you so much for your efforts. |
Hi @optiroot ,
Yes, you can make a side-wide block to display ads all pages in your site. |
Hi Neil it will not work , will show only the banner if you back from page with one lock only could you tell me what you have to add to it to make it work |
@neil96 I'm not a php development and not using WordPress either, I'm currently facing the same issue as one of my ads displays randomly on mobile pages. I saw your solution and couldn't help but wonder how exactly it does the trick for JavaScript or jQuery cases. Could you explain how your script works for the solution you presented!? And possibly how I can use it to perfect mine. |
@dryleaf , Google adsense does not compatible with full ajax mode. Did you turn on ajax mode? Regards. |
How do I check if I turned on ajax mode? |
@DonnaScriptTechs removing sensitive information like vendor code etc is not going to earn you any revenue... Please don't give mis information here |
Hello everyone........This issue prevails due to cache... try it in private browser I hope it works for your users.... If not then there are issues in div containers on your page..... |
@optpf @sahilbhat1986 Regards. |
Hello,
[BOOTSTRAP THEME]
I'm inserting AdSense Ads in my website.
For first, there is an issue. The problem is with the responsive AdSense unit (everything written below is about this type of Ad)
If I insert the AdSense unit in the block 1 and I go in every page, the page loads. But if I go to see a photo, it will display, but if from the photo I go in another page, this page will not load or will be loaded for half.
If i insert an AdSense unit in the block 1 and another in the block 3, any page will load practically.
I have understand the problem.
If the page where I go has three columns (left sidebar, center (stream) and right sidebar) and in the next page I'll go I have both in the block 1 and block 3 Ads, the page will load.
But if I am in a page that has two columns (example: the photo index) if I want to go on a page that has 3 columns, it will not be loaded or will be loaded wrong (for instance: just the left sidebar).
This is a of course ajax problem, and the Chrome console outputs:
Uncaught TagError: adsbygoogle.push() error: No slot size for availableWidth=0
Obviously is clear that if there aren't enough columns in the page you stay and you go on a page that has more columns (and I'm talking ever if in these columns there are ads), AdSense can't get the "new" column because AdSense will be loaded while the next page is getting loaded, and just because the next page will not be shown until it is loaded, AdSense gives this error in the console and doesn't let the page get loaded because doesn't find the space for the next Ad that the new page is asking. This problem is really important.
Moreover than this, just for this, I'm putting in every PHPfox place up to 3 columns via block 1 and block 3, adding elements. But sometimes (and I guess it is for this bug) Ads don't get shown...
Please, fix this ASAP! It is really important because makes the whole site unusable. If you need more details, ask me.
But the necessary step to reproduce this is just by:
Create two responsive Ads in the Adsense console.
Place in the index.member: 1st block an AD, 3rd block another one.
Then wait until AdSense will show them.
Go in the website (index) them from the top menu go in another page like 'photos'. Do not go on Forums or Events because they have 3 columns so you will not notice the problem.
Then, from photos go again in the homepage by clicking the sitename or the "home" button. You will see the homepage doesn't load.
Please, fix this ASAP, I really hope withing max one week. It's really important, my website is unusable.
Thank you!
The text was updated successfully, but these errors were encountered: