I have a problem with this button. It doesn't appear anywhere. I tried all the settings I found, tried it in a block, but nothing. The block appears, but it's empty. All the permissions are ok, it should be seen by everyone. Also tried dev version, but nothing. The 6.x version in Drupal 6.22 appeared in Chrome/Chromium and mobile browsers only (not in FIrefox, IE, Opera or UZBL), but this 7.x version appears nowhere.

Comments

corbacho’s picture

Can you post the problematic page?

Or if not, can you check in the source code of the page, if:
* The

loading the Google+1 button library is there ? * The tag of the button is there? It has the original syntax? or has been replaced (rendered) by Google? I mean, Google replaces the tag by the actual button. Can you open Firebug or Dev Tools in your browser and check that there is no Javascript erros in the console when loading the page?
freyr’s picture

This is the site (it's far not done yet).

It should be appear in two places, in a block for the whole site and before a page content for that page (I turned on both). These are the codes on the page what contains the code for the button:
First, I found this code:

<div id="block-google-plusone-google-plusone-block" class="block block-google-plusone contextual-links-region"> 
 
    <div class="contextual-links-wrapper"><ul class="contextual-links"><li class="block-configure first"><a href="/admin/structure/block/manage/google_plusone/google_plusone_block/configure?destination=node/1">Blokk beállítása</a></li> 
<li class="skinr-block-configure last"><a href="/admin/appearance/skinr/edit/nojs/block/google_plusone__google_plusone_block/configure?destination=node/1">Edit skin</a></li> 
</ul></div> 
  <div class="content"> 
    <g:plusone href="http://[site url..]" ></g:plusone>  </div> 
</div>

And this one:

<div class="content clearfix"> 
    <g:plusone href="http:[page url..]" ></g:plusone><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded">[my content..] 
</div></div></div>  </div> 
 
      <div class="link-wrapper"> 
      <ul class="links inline"><li class="node_google_plusone_link first last"><span><g:plusone href="http://[page url..]" ></g:plusone></span></li> 
</ul>    </div>

And this script at the end of the body. The Chromium dev tools says there is an Uncaught Syntax Error: Unexpected identifier right at this point in the script tag:

<div class="region region-page-bottom"> 
    <script>(function(d,t){var g=d.createElement(t), s=d.getElementsByTagName(t)[0];g.async=true; g.src='https://apis.google.com/js/plusone.js';g.innerHTML={lang:"hu"}s.parentNode.insertBefore(g,s);})(document,'script');</script>  </div>
corbacho’s picture

Oh thanks for this good report.
Now I see the bug: It's missing a semi-colon after {lang:"hu"}

Nobody else complained because most of people I guess it's using the English default language, so then that string is not injected there. Also probably it happens only when Javascript Async loading is enabled.

Later today I will push the fix. Thanks again

freyr’s picture

With default language it's shown in Chromium and mobile borowsers. But still not displayed in Opera, UZBL, Firefox (5.0 and nightly, both Linux and Windows version) or Internet Explorer. These are the codes from Firefox:

<div id="block-google-plusone-google-plusone-block" class="block block-google-plusone">

<div class="content">
    <g:plusone href="http://[site url..]" ></g:plusone>  </div>
</div>
<div class="content clearfix">
    <g:plusone href="http://[page url..]" size="medium" ></g:plusone><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded">[page content..]

</div></div></div>
<div class="region region-page-bottom">
    <script>(function(d,t){var g=d.createElement(t), s=d.getElementsByTagName(t)[0];g.async=true; g.src='https://apis.google.com/js/plusone.js';s.parentNode.insertBefore(g,s);})(document,'script');</script>  </div>

These are the Inspect Network Request to pluseone:

- Request URL: https://apis.google.com/js/plusone.js
- Request Method: GET
- Status Code: HTTP/1.1 200 OK

Request Headers 11:02:10.493
  
- Accept:*/*
- Accept-Encoding: gzip, deflate
- Accept-Language: hu-HU,hu;q=0.8,en-us;q=0.5,en;q=0.3
- Cache-Control: max-age=0
- Connection: keep-alive
- Host: apis.google.com
- Referer: http://[page url..]
- User-Agent: Mozilla Firefox 3.6

Sent Cookie
- HSID: AwIPzyKfp91nqrLTd
- MPRF: [long string..]
- NID: 48
- PREF: ID
- SID: [long string..]
- SSID: AWGAkJYl1FV_eAOQO
- rememberme: true
  
Response Headers Δ174ms
  
- Cache-Control: private, max-age=300
- Content-Type: text/javascript; charset=utf-8
- Date: Wed, 20 Jul 2011 09:02:10 GMT
- Expires: Wed, 20 Jul 2011 09:02:10 GMT
- Server: GSE
- Transfer-Encoding: chunked
- X-Content-Type-Options: nosniff
- X-XSS-Protection:1; mode=block
- x-frame-options: SAMEORIGIN
- Request URL: https://ssl.gstatic.com/webclient/js/gc/22431124-0a127465/plusone-unsupported.js
- Request Method: GET
- Status Code: HTTP/1.1 304 Not Modified
  
Request Headers 11:02:10.672
  
- Accept: */*
- Accept-Encoding: gzip, deflate
- Accept-Language: hu-HU,hu;q=0.8,en-us;q=0.5,en;q=0.3
- Cache-Control: max-age=0
- Connection: keep-alive
- Host: ssl.gstatic.com
- If-Modified-Since: Wed, 13 Jul 2011 00:54:12 GMT
- Referer: http://[page url..]
- User-Agent: Mozilla Firefox 3.6

Response Headers Δ69ms
  
- Age: 21654
- Date: Wed, 20 Jul 2011 03:01:16 GMT
- Expires:Thu, 19 Jul 2012 03:01:16 GMT
- Server: GFE/2.0

There are some CSS errors, but those are not connected to the button.
Firebug didn't find any errors or warnings.

With the Windows version of Firefox, there is more space where the button should be appeared, but the Firebug didn't find any errors or warnings.

corbacho’s picture

About IE and other new/old browsers I have a warning in the project page: check this #1211336: Works in FF4/Mac but not Safari5 or Chrome12

I opened your page in Firefox 5 and the button is there but the iframe has this CSS rules:

element.style {
    left: -10000px;
    position: absolute;
    top: -10000px;
    width: 106px;
}

So the button is kind of hidden.

Why Google does this? I don't know but someone else had same problem. Check this #1178714: "plus one" button not rendered

Cold you check if disabling the async loading option in the admin settings makes any difference?
Thanks

freyr’s picture

No, it doesn't help. I also tried the other settings, Tag syntax, Scope and Parse syntax, but nothing changed. With explicit call it doesn't appear anywhere. I also found a Wordpress site with +1 button, in Chromium and in Opera it's there, but in Firefox or UZBL it can't be seen.

corbacho’s picture

I found that the button displays this url in the button: http://xn--magyarhiz-d9a.hu
The module uses global $base_url; to build the URL if you don't put a specific URL in the block. Are you?

Also see this issue in Webmasters Central. Seems similar to your case http://www.google.com/support/forum/p/Webmasters/thread?tid=75e981fd234f...

freyr’s picture

I inserted this CSS code in my index.php:

#___plusone_0 iframe {
position:static !important;
left:0px;
top:0px;
}

Now the button appears, but only in the block and except in this page.
I found the other iframes in Firebug and I can fix this from there.

Update: I noticed that Firefox (Arch) Linux version doesn't show any of these buttons, nowhere over the internet. Not even the iframes are appeared. The Windows version is good. Is this a Firefox or a +1 button bug? I think Firefox.

freyr’s picture

Issue summary: View changes

correction of the description

kscheirer’s picture

Issue summary: View changes
Status: Active » Fixed

This was a few years ago, I'm assuming the issue was resolved? If not, please check again with the latest version of the module.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.