Ok, the problem was solved. But I'm not sure how exactly.
After I wrote this post I noticed that the latest version of NodeBB is 1.16.x. But while upgrading the forum i switched to 1.15.x branch (I thought that was the latest).
After that, I used ./nodebb upgrade command. Maybe this was the issue? Maybe, I switched to the previous version branch, but installed the latest version of files with the "upgrade" command? — I don't really know. But when I switched to 1.16.x and upgraded the forum again, then it worked as expected. The forum now works fine.
UNSOLVED Adsense Ads wont load properly
I have hosted a live forum running at sonic-developers.com with advertisements in the widget areas at top, right sidebar and bottom.
The issue is that after navigating inside any subcategory or to a thread on the forum, that is 2 or 3(max) navigations, the Adsense advertisements stop loading.
Can someone help me with pointing and fixing out the issue? I've been loosing revenue steadily due to the advertisement issue.
@d3athwarrior Did something change recently or has this been the case since you installed NodeBB?
The only thing that came to mind was the possibility of pjax (partial page reloads) where the iframe or the original scripts were removed from the page when part of the page's content was reloaded.
I don't know enough about NodeBB yet and haven't had time to investigate. That and I detest turning off AdBlock.
I think this has always been the case for adsense, since NodeBB doesnt do full page reloads the ads only show for the 2-3 navigations and then stop refreshing.
Once solution is to remove ajaxify and do a full page load on each navigation.
At some point I also managed to get it working with Google DFP, using this code in a widget..
If you want to disable axaxify and test you can comment out this line.
@baris Thanks for the tip. I did disable ajaxify for anchor tags as you said, restarted nodebb and it worked! It loads ads properly!!
Thank you so much, I was looking for this part since so long!
Will test more for whether it breaks other things or is all set and keep this thread updated.