I am using google reCAPTCHA V.2 in my website, which is running on a localhost in a MAMP server.
I am doing all the widget integration correctly (both on frontEnd and server side), the proof is that the widget displays correctly on firefox 38.0.1 and that the validation works smoothly
http://imgur.com/cm83p39
but it displays strangely on chrome
http://imgur.com/KHC7hMN
Needless to say, I am doing everything that needs to be done. Again, the proof is that it is working in firefox, but not in chrome...
Without going into detail, in HTML the page looks something like this:
<!DOCTYPE html>
<html>
<head>
<title>reCAPTCHA demo</title>
<script src='https://www.google.com/recaptcha/api.js?hl=en'></script>
</head
<body>
<form id='reCaptcha' action='myValidationScript.php' method='POST'>
<div class="g-recaptcha" data-sitekey="myKey">
</div>
<input type='submit'>
</form>
</body>
</html>
The problem is not on the server, the code I use in PHP to do the validation looks something like this (again, without going into detail).
<?php
if(isset($formFields['g-recaptcha-response']))
{$captcha=$formFields['g-recaptcha-response'];}
$secretCaptchaKey='mySecretKey';
$response=file_get_contents(
"https://www.google.com/recaptcha/api/siteverify?secret=$secretCaptchaKey&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']
);
$response = json_decode($response, true);
if($response["success"]==true){echo('yay!!')}
else{echo('nay')}
?>
The closest answer I've read in the web is from google's FAQ where they discuss the "no_checkbox" issue saying that my client does not have the necessary resources to load the widget and that it falls back to an alternative challenge. But the example they put there (an image with text) is far from the ugly texts I am getting in chrome...
Again, please understand there is no server problem with this, the proof is that it works on firefox...
For information, I had the exact same issue in the past and I solved it by upgrading the browser. Now I have it again in chrome...
any ideas?
I had a similar issue here: reCAPTCHA working flawless in Firefox (51.0.1) and displaying the message "invalid domain for site key" in Chromium (55.0.2883.87).
A workaround was to disable the "Verify the origin of reCAPTCHA solutions" checkbox in the reCAPTCHA configuration for my domain which made reCAPTCHA work in Chrome.
Of course, this is not a sustainable solution. Upon further investigation I found out the problem was caused by the German "Umlaut" characters in my domain name. To solve it, I just needed to add the Punycode of my domain to the reCAPTCHA config.
Related
I noticed this issue occurring in the past few weeks, and never experienced it before. Basically, In Windows, if I set the default Email to Chrome, mailto links no longer work properly. The browser I am using to click on the link produces different results, but none of them work correctly.
Step-by-step, what I'm doing is:
In Windows > Default apps > Email - set to Chrome
In ANY browser, click a mailto URL
Chrome: Nothing happens
Firefox: Opens new, empty Chrome window
If I set the Default Email to use Firefox, the mailto URLs work fine from all browsers.
Here is some HTML code I was able to reproduce the bug in:
<!DOCTYPE html>
<html>
<body>
This is a test.
</body>
</html>
I am inclined to believe this may be a bug between Windows and Chrome, because this only very recently started happening.
Some things I tried include:
Changing Chrome Privacy settings
Other threads suggested Handlers settings in Chrome, which did not solve this
Verify the default program was set correctly (Default Programs > Associate a file type or protocol with a program)
Use window.open instead of href (not that this would be a good solution, but it yielded similar results)
I'm developing a web system now, and have debugged a very strange bug just now.
First I describe the bug itself here.
Problem:
When visit http://mysite/, it redirects to login and do logout at once.
There is a page, which url is /site.php?arg1=xxx&arg2=xxx everything is well in chrome, but when I use the ie8, after this page loaded, the account is logged out!
Bug Location:
After a long term of debugging, I found that the point which causing the problem is:
<img class="item_thumbnail" src="" />
If I remove this tag, everything become good.
So I'm wondering: when the <img> tag render, what's its behavior? Will it request the login page? But everything is in mass with ie.
What cause this problem? And what will ie an non-ie deal with the img-src?
Need your help!
As I suspected, according to
Empty image src can destroy your site
Internet Explorer makes a request to the directory in which the page
is located. For example, if you have a page running at
http://www.example.com/dir/mypage.htm that has one of these patterns,
IE makes a request to http://www.example.com/dir/ to fill in the
image.
Safari and Chrome make a request to the actual page itself. So
the page running at http://www.example.com/dir/mypage.htm results in a
second request to http://www.example.com/dir/mypage.htm to fill in the
image.
Hit F12 and look in the network tab to see.
I'm playing with a test project using the facebook api (via omniauth) to get back a users profile image, and I get a url something like this: http://graph.facebook.com/4/picture?width=200&height=200
If you curl this url and see the headers it has a 302 redirect to: (location) https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xfa1/t1.0-1/1939620_10101266232851011_437577509_n.jpg
In most browsers they seem to follow this url, but chrome on my computer seems to have stopped following the redirect recently (im not sure if some other behaviour has changed recently though).
What is the default behaviour for browsers? Should they follow the redirect?
If you want to do a test just run this test:
#test.html
<html>
<body>
<img src="http://graph.facebook.com/4/picture?width=200&height=200">
</body>
</html>
I seem to have figured out why this stopped working for me.. I am using a chrome plugin called Ghostery which seem to be blocking the facebook graph call: http://graph.facebook.com/4/picture?width=200&height=200
And because of that the actual image was not shown, because the redirect was never sent back to the browser..
Anyway I guess this means browsers do indeed follow redirects!
I am finally getting my Google script to work. It works fine in Chrome. I am using htmlservice.createHtmlOutputFromFile and the site is obviously hosted on google sites.
But when I try the page in IE, I get
This content cannot be displayed in a frame
To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.
I tried adding in head tag
meta http-equiv="X-Frame-Options" content="allow"
but it made no difference.
Is there a javascript trick or a GAS library function I can use to try to get this to work cross browser?
Maybe your problem is related to cross domain cookies.
Check this answer maybe will work to you.
I'm trying to add a tweet button to html page , I use the official code from the twitter button generator ,
http://twitter.com/about/resources/buttons#tweet
when I test the page on chrome and Firefox , the button doesn't appear , only an underlined text says : "Tweet"
here is the code :
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
Tweet
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</body>
</html>
I had this same problem, and it drove me nuts until I narrowed it down to cookies possibly being blocked. I was running an Add-On called 'Disconnect' from https://disconnect.me/ . Once I disabled this addon and restarted the browser the Tweet button started working again.
So if you're using that addon or any other one to block cookies or prevent you from being tracked by social networking sites, you'll need to disable it if you want to see the tweet button.
I just noticed that I duplicated #jcaruso's reply.
tl;dr;
Try disabling ad-blocking extensions. For me the problems were caused by disconnect.me extension.
How I found that out? I noticed in the chrome dev console, that request to twitter to load widgets.js gets a 307 redirect to about:blank.
Thanks to that answer I figured out that it's caused by one of the extensions. Disabling the disconnect.me extension fix the problem with twitter and facebook buttons on mine and other pages.
For me it was the chrome extension AdBlock that was causing the issue.
Thanks to others for pointing me in the right direction!
Your code is fine. If you can't see the button, this means you don't have access to twitter.com.
Make sure you can access twitter.com normally via your browser and that your company, firewall, parental control, etc is not blocking access or interfering with it in any way.
See your code in action here It works fine in Firefox, Chrome and IE as I just tested.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
Tweet
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</body>
</html>
Check out the screenshot below, your code's performance in IE 8, Firefox 9, Chrome 16. it works as expected.