-
Hi there,
I’ve just purchased your amazing plugin, but I’m having a problem, similar to the one described here:
http://userproplugin.com/userpro/forums/topic/syntax-error-unexpected-token-when-using-with-s2member-plugin/only, the error code I get is SyntaxError: JSON.parse: unexpected character
I deactivated all plugins and reactivated one by one and discovered that it’s a conflict with S2Member.This makes sense, as both plugins try to control user registration, but I made sure my settings for both match (user fields collected, assigned role upon registration etc).
In the post I indicated, you sent a version of your plugin that would avoid the conflict? Could I have that too?
Will send you purchase code details in a private message, ok?
Cheers
EmanueleWhich version of UserPro do you have? This issue was fixed versions ago! 🙂 Can I ask where do you get this error, at which process, login, or register, etc?
Hi!
I had 1.80 but have just upgraded to the latest version.
Still having the same problem though.I get it at registration. I am registering with a form that collects name and email only.
I enter the details and press register, after a while I get the “SyntaxError: JSON.parse: unexpected character” error, so nothing happens. No pages loads, everything stays there, on the registration form.
In reality though the user account was created and the user is actually logged in…It does work. But I need to use both S2Member and UserPro!
I tried all possible combinations of settings that I could think of, making sure that S2member requirements for registration were met (collect both name and last name, register at the Subscriber level, etc), but nothing works. That error always comes up… 🙁
Hi Ahmed,
any updates on this? I’m still unable to use the plugin.
I did think of something though, in the meantime.The reason why the fixes you included in the recent version of userPro do not seem to work for me, is most likely because I am using a white label version of S2Member (OptimizeMember, which is a plugin that comes with OptmizePress). The two plugins (S2Member and OptimizeMember are pretty much identical, but they did change some of the code (mainly so that any instance of “s2” is now “omp”).
This means that, if you could send me the actual code that was inserted in the UserPro update that dealt with this annoying S2Member issue, I might be able to resolve it once and for all!
That would be awesome!
thank you
hello again Ahmed,
I can confirm that with the actual original version of S2Member there is no conflict and JSON.parse error.
This means that if I could get the code that you inserted in the latest version of UserPro to fix the S2Member issue, I should be able to tweak it so that it works with my version.
I can’t believe I was so silly to not think/realise that I was using a white label version of S2Member… sorry again!And thanks for the help. Hope I can get UserPro working real soon! I love all its features and can’t wait to use them!
CheersSure, here’s what I made to make UserPro works fine with S2member
in functions/ajax.phpremove_action(“wp_login”, “c_ws_plugin__s2member_login_redirects::login_redirect”, 10, 2);
$user = wp_signon( $creds, false );
add_action(“wp_login”, “c_ws_plugin__s2member_login_redirects::login_redirect”, 10, 2);Replaced:
$user = wp_signon( $creds, false );
See how I removed the action that they trigger and infects the ajax process.
hello!
And thanks for that!!
I tried modifying your code so that it talks to OptimizeMember, rather than S2Member.
They use the function c_ws_plugin__optimizemember_login_redirects::login_redirect
instead of c_ws_plugin__s2member_login_redirects::login_redirectbut I was still getting the error… so I did something drastic.
I removed the action from OptimizeMember (optimizeMember/optimizeMember-pro/includes/hooks.inc.php):add_action(“wp_login”, “c_ws_plugin__optimizemember_login_redirects::login_redirect”);
is now gone and UserPro seems to work fine. I hope it wasn’t anything too important for OptimizeMember and haven’t created a bigger problem, eh eh! But for now, I seem to have achieved for I wanted.
Thank you so much for your help! Its much appreciated!
Cheers
EGreat. Thanks for sharing the fix! It will help others for sure. 🙂
You must be logged in to reply to this topic.