fumikito / gianism

WordPress Plugin to enable user to login with Social Account(Twitter, Facebook, Google etc.)
https://gianism.info/
25 stars 25 forks source link

Error - Sorry, but wrong access. Please go back #50

Closed rahulrameshnair closed 9 years ago

rahulrameshnair commented 9 years ago

I am getting this error when I try to login using social network.

I already tried deactivating all other plugins and Cloudflare, but the problems is still there.

Please help. :(

screenshot_2

fumikito commented 9 years ago

@sinofanger

Does your environment supports $_SESSION?

This error means that plugin fails to retrieve the task to do.

Please check if your server supports session.

Try uploading this script as http://worldanimeclub.com/session.php and check if number counts up as reloading.

<?php
// Starting session
session_start();
if( !isset($_SESSION['number']) ){
    $_SESSION['number'] = 0;
}
// Increment it
$_SESSION['number']++;
// If session enabled, this number will be increment as loading.
echo $_SESSION['number'];

Or else, If cache engine is enabled, exclude path below from caching.

rahulrameshnair commented 9 years ago

Hi, I cleared the cache and the problem has been fixed.

Now everything is working but can you please tell me how I can show the buttons inside the comment form. It is said that I should add this code:

if(function_exists('gianism_login')){ gianism_login(); }

But where in comments.php should i add it? screenshot_3

fumikito commented 9 years ago

@sinofanger

But where in comments.php should i add it?

It depends.

Suppose that your theme is based on 2015, comments.php is like this.

In comments.php, the function comment_form () is invoked.

Opening it, you will find some difficulty. It's very complicated. If you are experienced devloper, open wp-includes/comment-template.php and you'll know what to do.

Else, copy and paste this to your functions.php.

// This action is called after the notice which your comment form display 
// when your user is not logged in.
add_action("comment_form_must_log_in_after", 'gainism_login');

I don't try, but it may work.