Mobile devices login Fix
-
Hello,
I found a issue when login from mobile devices, and I applied a quick fix to it, so I am posting it here. I am running WordPress 3.9.2 and WordPress Social Login 2.2.3When trying to login from a mobile device, a new tab (pop up) was openning with one of the url parameters called “undefinedprovider”, and a 404 error was shown. On the back, the site loaded correctly the login of the social network.
So, what I did, in “widget.js”, just after the linepopupurl = $( '#wsl_popup_base_url' ).val();
I added an “if” checking if there is actually any value in “popupurl. So the code would be the following:popupurl = $( '#wsl_popup_base_url' ).val(); if (popupurl) { provider = $(this).attr("data-provider"); var width = 1000; var height = 600; var top = ( screen.height / 2 ) - ( height / 2 ) - 50; var left = ( screen.width / 2 ) - ( width / 2 ); window.open( popupurl + 'provider=' + provider, 'hybridauth_social_sing_on', 'location=1,status=0,scrollbars=0,height=' + height + ',width=' + width + ',top=' + top + ',left=' + left); }
That avoids the unnecesary pop up in mobile.
That’s all!
P.D: Anyone detected the same problem? Seems strange it is happening only to me…
- The topic ‘Mobile devices login Fix’ is closed to new replies.