Specified Adsense Code gets modified after saving

  • Anonymous

    #1406

    Hi. Thanks for this great theme! I just upgraded my site to the latest version of your theme but unfortunately I noticed my Adsense Code suddenly doesn’t work. It worked on the previous version.

    The problem is when I pasted my Google Adsense Code in the Adsense Options. After saving it and viewing the site, I’m seeing a “Web page not available… HTTP error code: 400 Bad Request” message instead of the actual banner ad.

    Going back to Adsense Options on the Settings, I noticed my Adsense Code was implicitly changed into just the following:

    <script type=”text/javascript”>

    </script>

    <script type=”text/javascript” src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”&gt;

    </script>

    So obviously it wouldn’t work because all the Google Adsense info are stripped off. Please fix.

    Thanks,

    Nino

    ninoguba

    #15656

    I tried fixing it from the function.php file but looks like the problem is on the “saving” part and not on the “displaying”. So for now, I just manually inserted my Google Adsense code in the function.php file while I await your fix. Thanks.

    Mod

    Kenneth John Odle

    #15657

    Not a bug, so moved to Support.

    Hard for us to see what is wrong unless you change it back.

    Ken

    ninoguba

    #15658

    Ok I still think it is a bug. When going to the Appearance – Graphene Options – Adsense Options and then pasting the code below in the Adsense Code textarea field:

    <script type="text/javascript"><!--
    google_ad_client = "my_ad_client_id";
    /* My Ad */
    google_ad_slot = "1234567890";
    google_ad_width = 468;
    google_ad_height = 60;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>

    Note that I modified some of the values here. Now when you save the options, look at this field again and it becomes:

    <script type="text/javascript">
    </script>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>

    So as you can see, all the important code that Google needs gets stripped out. Hope this clarifies the issue and that we can get a fix soon.

    Thanks!

    Admin

    Syahir Hakim

    #15659

    I just tried copying the exact code you posted above and the theme saves the code just fine. Nothing get stripped.

    What version of Graphene and WordPress are you running?

    stevivor

    #15660

    I’m having a similar problem where I’m inserting the following:

    <script type=”text/javascript”><!–

    google_ad_client = “ca-pub-#############”;

    /* Banner2 */

    google_ad_slot = “####”;

    google_ad_width = 728;

    google_ad_height = 90;

    //–>

    </script>

    <script type=”text/javascript” src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”&gt;

    </script>

    But my Adsense ads are not displaying. This goes for the option inside Graphene Options as well as using a Text Widget in my footer/sidebar.

    Any ideas as to what I’m doing wrong? Using Graphene 1.4.1 and WordPress 3.2.1. I think this has been happening since Graphene 1.4.

    You can see the blank boxes along my right-hand side bar and in my footer on my main page (http://www.stevivor.com) or between post excerpts throughout the site.

    Thanks!

    stevivor

    #15661

    Well, I can confirm it’s not Graphene doing this to my situation, as I’ve confirmed the same problem with a number of themes. Sorry and thanks!

    ninoguba

    #15662

    I upgraded to Graphene 1.4.1 and using WordPress 3.1.2. Everything was working fine when I was on Graphene 1.3.x.

    For now I have hacked your functions.php file and explicitly inserted my Adsense code. But would be nice if I could specify this code on the Admin Options page. Thanks.

    Maybe I’ll try using IE browser to set this. I was using Chrome when I encountered the issue.

Viewing 8 posts - 1 through 8 (of 8 total)

  • You must be logged in to reply to this topic.