Parts of Adsense code goes "missing" after saving

  • Tom1473

    #8327

    Hi,

    I have got a problem with the adsense placeholder. When I copy the code and save it, everything looks fine. But when I go to the page, or somewhere else and return to the adsense options bar, there are parts of the code missing, namely the “data-ad-client” and the “data-ad slot”. Therefore my ads are not working.

    I wanted to change my text only ads to image ads. Since then the problem occurred. I believe that the problem lies within the graphene theme. I have looked at the source of my site and there the parts of the code are missing as well.

    Again, when I save the code, everything is there, only when I return later, the info has disappeared.

    Help in this matter would be hugely appreciated.

    Many thanks in advance

    Mod

    Kenneth John Odle

    #40901

    This is not a bug, as it is not reproducible.

    Have you tried the usual debugging techniques, such as disabling plugins, switching to default theme, etc.?

    Tom1473

    #40902

    Yes, have tried all that, but it’s still the same.

    Mod

    Kenneth John Odle

    #40903

    Which version of WordPress are you using? Which version of Graphene? Have you made any edits to the theme files?

    Tom1473

    #40904

    Hi,

    I’m using WordPress 3.6.1 and Graphene is on 1.9.2. Thanks

    leo72

    #40905

    Hi all. I’m new. Sorry if I reply to this thread that’s 1 month old but I’m having the same problem.

    I registered myself to the Adsense program from Google, then I kept the code of my adsenses and tried to save it into the Adsense placeholder of the theme. I save it but, after a refreshed the page, I got a code with portions missing.

    The original code looks like this:

    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- myBanner -->
    <ins class="adsbygoogle"
    style="display:inline-block;width:728px;height:90px"
    data-ad-client="ca-pub-xxxxxxxxxxxxxxxxxxxx"
    data-ad-slot="xxxxxxxxxxxxxx"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>

    After I refreshed the page, I got this code instead:

    <script src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!--myBanner -->
    <ins class="adsbygoogle" style="width:728px;height:90px"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>

    As you can see the theme has changed the code provided by Google. It seems a theme bug, IMHO.

    Sorry: WP 3.7.1

    Mod

    Kenneth John Odle

    #40906

    I have moved this to support, as this is not a bug.

    Quote:
    As you can see the theme has changed the code provided by Google. It seems a theme bug, IMHO.

    Sorry: WP 3.7.1

    Why assume Graphene did this? The obvious solution is to switch to the default theme and drop that code into a text widget.

    What is probably happening is that Google has not yet populated ads on your site. This process can take a few days, although I’ve seen it happen in less than a day.

    leo72

    #40907
    Quote:

    Why assume Graphene did this?

    Because I see a different code.

    I save the original code. Graphene tells me that it did it, then I refresh the page and I find a different code. Without my ID, how can Google know that I’ve put the code into my site?

    Quote:

    The obvious solution is to switch to the default theme and drop that code into a text widget.

    What is probably happening is that Google has not yet populated ads on your site. This process can take a few days, although I’ve seen it happen in less than a day.

    It’s 2 days I’ve registered to Adsense but Google doesn’t see the Adsense into my site.

    Prasanna SP

    #40908

    Bug confirmed. The fix will be available in Graphene 1.9.3. If you are comfortable with editing theme files, please replace graphene/admin/options-validator.php with this updated one.

    leo72

    #40909

    Thank you. I’ll try to replace that file.

    EDIT:

    the fix seems to work. The code hasn’t been changed after saving.

Viewing 10 posts - 1 through 10 (of 12 total)

You must be logged in to reply to this topic.