Incompatibilities with WordPress 4.3

Hello.

I`m having trouble with User Sync plugin. When plugin is trying to send a request to another site, the following log at client is printed at errors_s.log:

[2016-01-18 20:00:07][S] 0-10 - ajax actions***
[2016-01-18 20:00:07][S] 3-10 - p or hash not set***

At master, the following lines pops up in errors_m.log:

[2016-01-18 20:00:34][M] 02 - sending request - url=http://ec2-52-90-78-215.compute-1.amazonaws.com/wp-admin/admin-ajax.php?action=user_sync_api;;***
[2016-01-18 20:00:35][M] 03 - sending request - response=0;;***
[2016-01-18 20:00:35][M] 06 - checking key false;;***

After some debugging I checked out that some incompatibilities were ocurring at user-sync.php:341, send_request method. The value of $args[body] are being set with an array containing the action key only, so neither p or hash params were being sent. Nothing passed in $param was being set.

Converting $param into an array seems to work, request was sent, but the plugin could not handle the reponse due to similar incompatibilities: it can`t read the request response and cannot keep with the procedure of syncying users.

Here is my change:
parse_str($param, $params);
$url = $url . "/wp-admin/admin-ajax.php?action=user_sync_api";
$args = array(
'method' => 'POST',
'timeout' => 10,
'blocking' => $blocking,
'body' => $params
);

Well, Im unable to sync users, and as far I can see, when I try to sync all subsites from Master neither the key check is ocurring. I need help here. Im attaching both logs files and php.ini output from both servers.

Need to put this environments to run ASAP.

  • Nastia

    Hello Bruno, I hope you are doing well today!

    I'm sorry to hear you have this issue1

    Just to be thorough, you've already gone through the handy flowchart we have on our Getting Support page, right?

    https://premium.wpmudev.org/manuals/getting-support/

    (it helps to know what troubleshooting has already been done here)

    Also, have you tried disconnecting the sites from each other, and then re-connecting?

    If that doesn't do anything, could you try going to user-sync/user-sync.php, and changing the timeout value on line 351 to a higher number? (Please make a backup of the file first!)

    Please advise,
    Nastia

  • Bruno

    Hello Nastia.

    Thanks for your reply. Yes, I checked the manual, and I found topics talking about this issue, but none with solution.

    I changed the timeout directive, but still getting the error. As I said, the response for requests is always 0, even if I reconfigure the connections.

    Usually 0 response occurs when WP can't handle ajax requests, but I have disabled all other plugins and still get the errors. I'm able to login at website admin and both servers are running with no problems.

    Along with 0 response an error is printed at error_s.log indicating that p and hash parameters are note sent with the request. Doesn't seems to you that the request body is being bad formed?

  • Bruno

    Hi.
    I updates wordpress version on both sites, made new tests and still getting the erros mentioned before.

    Response is 0 at master:
    [2016-01-21 20:31:27][M] 02 - sending request - url=http://ec2-52-90-78-215.compute-1.amazonaws.com/wp-admin/admin-ajax.php?action=user_sync_api;;***
    [2016-01-21 20:31:28][M] 03 - sending request - response=0;;***
    [2016-01-21 20:31:28][M] 06 - checking key false;;***

    And at sub-sites i get this:
    [2016-01-21 20:31:00][S] 0-10 - ajax actions***
    [2016-01-21 20:31:00][S] 3-10 - p or hash not set***

    This occurs when, at master, I click on "Sync all sites now" button. Note that in screenshot i get a success message "Synchronization of all Subsites completed.", but no users syncronized.

    I need help ASAP, this should be in production days ago.

  • Nastia

    Hello @Bruno, I hope this message finds you well!

    I have tested the User Sunc plugin and between two separate and on multisite installations and could not recreate this issue.

    I'm reading in the error_m.log that security key is not correct and there is 0 responses from another server.

    [2016-01-18 19:54:16][M] 03 - sending request - response=0;;***
    [2016-01-18 19:54:16][M] 06 - checking key false;;***

    Can you kindly go to User Sync >> Uninstall options on both site's and then make a the master site and subsite again and then try it out?

    Let us know how it went!

    Kind Regards,
    Nastia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.