My site is Wordpress using the WP-Members plugin and OneAll's plugin. Also on the same domain, but not as an embed, I have an install of Vanilla using OneAll's Vanilla plugin. I am working to troubleshoot signed in users not being recognized between platforms even though I have the SSO option selected. Would it work better if I installed Vanilla on a subdomain?
I'd appreciate any thoughts, experience hints, and suggestions. Site is at writingpractice.com and writingpractice.com/vanilla
Answers
Are you using our both our plugins on the 2 web sites, without modifications?
What do you mean by "SSO option selected"? The plugins do not come with SSO support.
Regards
Odd where the test works but the use test fails. Any thoughts on this?
Could you provide us with extra information, by:
- open the Network console (ctrl-shift-q on Firefox),
- click the 'Verifiy API Settings',
- inspect the AJAX request (dump a screenshot here for example).
Or, you can log the error reply on the server.
Add this line: error_log(print_r($result, true));
in file wp-content/plugins/oa-social-login/includes/admin.php, at line 250 (after the $result = oa_social_login_do_api_request). This should look like:
//Get connection details
249 $result = oa_social_login_do_api_request ($api_connection_handler, $api_resource_url, array ('api_key' => $api_key, 'api_secret' => $api_secret), 15);
250 error_log(print_r($result, true));
For this to work, you need the following lines in the configuration file wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
(see https://codex.wordpress.org/Debugging_in_WordPress for details).
Thanks, and sorry for the lengthy reply.
I did read the WP link you included in your reply (which was not long at all, I am grateful for the help and the detail).
I redid this a few times, turned off some other plugins which could interfere, but never did I see errors register on screen nor did it create an error log.
I did receive the email stating I should fix the settings as someone had tried to log in using OA.
The image shows my (shared) server PHP setup as tested.
The code changes is supposed to log extra information when you click on the 'Verify API settings' only.
So, what you experienced is normal.
Could you try to verify the API settings again? (no need to disable the plugin, etc).
The reason is that the error message shown can be caused by different things, and this would help determine what.
Thanks.
jQuery(document).ready(function($) {
/* Autodetect API Connection Handler */
$('#oa_social_login_autodetect_api_connection_handler').click(function(){
var message_string;
var message_container;
var is_success;
var data = {
_ajax_nonce: objectL10n.oa_social_login_ajax_nonce,
action: 'autodetect_api_connection_handler'
};
message_container = jQuery('#oa_social_login_api_connection_handler_result');
message_container.removeClass('success_message error_message').addClass('working_message');
message_container.html(objectL10n.oa_admin_js_1);
jQuery.post(ajaxurl,data, function(response) {
/* CURL/FSOCKOPEN Radio Boxs */
var radio_curl = jQuery("#oa_social_login_api_connection_handler_curl");
var radio_fsockopen = jQuery("#oa_social_login_api_connection_handler_fsockopen");
var radio_use_http_1 = jQuery("#oa_social_login_api_connection_handler_use_https_1");
var radio_use_http_0 = jQuery("#oa_social_login_api_connection_handler_use_https_0");
radio_curl.removeAttr("checked");
radio_fsockopen.removeAttr("checked");
radio_use_http_1.removeAttr("checked");
radio_use_http_0.removeAttr("checked");
/* CURL detected, HTTPS */
if (response == 'success_autodetect_api_curl_https')
{
is_success = true;
radio_curl.attr("checked", "checked");
radio_use_http_1.attr("checked", "checked");
message_string = objectL10n.oa_admin_js_201a;
}
/* CURL detected, HTTP */
else if (response == 'success_autodetect_api_curl_http')
{
is_success = true;
radio_curl.attr("checked", "checked");
radio_use_http_0.attr("checked", "checked");
message_string = objectL10n.oa_admin_js_201b;
}
/* CURL detected, ports closed */
else if (response == 'error_autodetect_api_curl_ports_blocked')
{
is_success = false;
radio_curl.attr("checked", "checked");
message_string = objectL10n.oa_admin_js_201c;
}
/* FSOCKOPEN detected, HTTPS */
else if (response == 'success_autodetect_api_fsockopen_https')
{
is_success = true;
radio_fsockopen.attr("checked", "checked");
radio_use_http_1.attr("checked", "checked");
message_string = objectL10n.oa_admin_js_202a;
}
/* FSOCKOPEN detected, HTTP */
else if (response == 'success_autodetect_api_fsockopen_http')
{
is_success = true;
radio_fsockopen.attr("checked", "checked");
radio_use_http_0.attr("checked", "checked");
message_string = objectL10n.oa_admin_js_202b;
}
/* FSOCKOPEN detected, ports closed */
else if (response == 'error_autodetect_api_fsockopen_ports_blocked')
{
is_success = false;
radio_fsockopen.attr("checked", "checked");
message_string = objectL10n.oa_admin_js_202c;
}
/* No handler detected */
else
{
is_success = false;
radio_curl.attr("checked", "checked");
message_string = objectL10n.oa_admin_js_211;
}
message_container.removeClass('working_message');
message_container.html(message_string);
if (is_success){
message_container.addClass('success_message');
} else {
message_container.addClass('error_message');
}
});
return false;
});
/* Test API Settings */
$('#oa_social_login_test_api_settings').click(function(){
var message_string;
var message_container;
var is_success;
var radio_fsockopen_val = jQuery("#oa_social_login_api_connection_handler_fsockopen:checked").val();
var radio_use_http_0 = jQuery("#oa_social_login_api_connection_handler_use_https_0:checked").val();
var subdomain = jQuery('#oa_social_login_settings_api_subdomain').val();
var key = jQuery('#oa_social_login_settings_api_key').val();
var secret = jQuery('#oa_social_login_settings_api_secret').val();
var handler = (radio_fsockopen_val == 'fsockopen' ? 'fsockopen' : 'curl');
var use_https = (radio_use_http_0 == '0' ? '0' : '1');
var data = {
_ajax_nonce: objectL10n.oa_social_login_ajax_nonce,
action: 'check_api_settings',
api_connection_handler: handler,
api_connection_use_https: use_https,
api_subdomain: subdomain,
api_key: key,
api_secret: secret
};
message_container = jQuery('#oa_social_login_api_test_result');
message_container.removeClass('success_message error_message').addClass('working_message');
message_container.html(objectL10n.oa_admin_js_1);
jQuery.post(ajaxurl,data, function(response) {
if (response == 'error_selected_handler_faulty'){
is_success = false;
message_string = objectL10n.oa_admin_js_116;
}
else if (response == 'error_not_all_fields_filled_out'){
is_success = false;
message_string = objectL10n.oa_admin_js_111;
}
else if (response == 'error_subdomain_wrong'){
is_success = false;
message_string = objectL10n.oa_admin_js_112;
}
else if (response == 'error_subdomain_wrong_syntax'){
is_success = false;
message_string = objectL10n.oa_admin_js_113;
}
else if (response == 'error_communication'){
is_success = false;
message_string = objectL10n.oa_admin_js_114;
}
else if (response == 'error_authentication_credentials_wrong'){
is_success = false;
message_string = objectL10n.oa_admin_js_115;
}
else {
is_success = true;
message_string = objectL10n.oa_admin_js_101;
}
message_container.removeClass('working_message');
message_container.html(message_string);
if (is_success){
message_container.addClass('success_message');
} else {
message_container.addClass('error_message');
}
});
return false;
});
});
Hope I am barking up the right tree.
Yes, sorry for the confusing info.
So, once you apply the change to the PHP file (~line 250 error_log(print_r($result, true));), and clicked on the verifying the API in Wordpress | Oneall settings, something should have been added to the server's log (not the browser, actually, for now, we can even forget about the browser and its console).
So, do you see a wp-content/debug.log file in your server? (that's the one which should include the API verification result.)
Thanks for your patience.
The process above did not create the debug log. I deleted the two files (one I inserted on line 250 and the the other in the config file) and reinstalled them, all set to true. Cleared the cache. Tapped the API button and it returned an error. No log file was created. That is why I originally sent the PHP configuration to see if there was a setting I am unaware of that would prevent the log file from being created in the wp-content directory.
I appreciate your time spent in sorting this mystery.
Tomorrow I'll ask my host if he knows of a reason the file would not be generated.