User sync not working

Hi support guys,

Since 11-15-2017 I have a problem with syncing my 2 sites with each other.
Site A has 76 users and site B has 72 users. Now if I press "Sync now" it loads and then tells me the sync has successfully been executed. Which is not the case.

Please see this screencast:
https://share.vidyard.com/watch/dcg4Cz1EbMz5EyQAp4bGzL

Hoping you could solve this issue.
(i can provide wp admin or ftp logins if needed)

Regards,

Sander

  • Katya Tsihotska

    Hi Sander

    Hope you're having a wonderful day!

    In order to diagnose your issue, could you, please enable debug mode? To learn more about how to enable and use it, please check the Debug Mode section here:
    https://premium.wpmudev.org/project/wordpress-user-synchronization/#usage

    Please, note, as debug mode can be enabled only before select “Master” or “Sub-site”, you will need to Uninstall Options on both sites first.

    Then you'd need to enable debug mode on both sites and connect them again. After this, please, try to sync users again. Then download log files wp-content/plugins/user-sync/log/error.log from Master site and Subsite, save those files as master.txt and subsite.txt files and attach them to your next reply.

    Also, could you please grant us temporary support access to both websites so we can have a better look at your setup and settings? You can grant us access via WPMUDEV Dashboard plugin, there's no need to share credentials. Here's our detailed documentation page about it:
    https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    Don't forget to let us know once you'll do this.

    Kind regards,
    Katya

  • Sander

    Hi Katya!

    Thank you for your reply. I've repeated the steps you provided and I did see in the log that the key from the subsite was not recognized by the master site, I checked but the keys are both the same:

    [2017-11-30 10:07:52][M] 03 - sending request - response= 63910eb91613afb4541d285c3f1059dc;;***
    [2017-11-30 10:07:52][M] 06 - checking key false;;***

    https://www.dropbox.com/s/d7ayco7cvqkl4c7/errors_master.log?dl=0
    https://www.dropbox.com/s/cb4irqik83y68gt/errors_sub.log?dl=0

    Access is granted on both sites :wink:

  • Katya Tsihotska

    Hi Sander

    Hope you're fine!

    Thank you for sending error reports and for enabling access.

    For some reasons, I can't login to your master site, got the following error

    You do not currently have a Shield user session.
    Please login again.

    I suppose this caused by one of your security plugins. Could you please send us your details through our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question using this template:

    Subject: "Attn: Katya Tsihotska"
    -WordPress admin username (master site)
    -WordPress admin password (master site)
    -login URL (master site)
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant URLs

    Please use this subject line to ensure that it gets assigned to me

    Also, in order to diagnose your issue, I'd request you to perform the two tests mentioned in the following:

    1. Just to make sure no other plugin is causing this, can you please do a plugin conflict test?
    The simplest way to perform a plugin conflict test (please, note, that you will need to do this on both sites):

    * Login to your site via FTP
    * Navigate to wp-content
    * Rename the plugins folder to _plugins
    * Creant new empty plugins folder
    * Move the plugin folder (ex: user-sync) you want to test from _plugins to plugins
    * Check if issue still persists, if no, proceed to the next step
    * Then, one at a time, move other plugin folders over from _plugins to plugins until the symptom returns

    NOTE: While you are doing this, do not visit WP Admin > Plugins on your site. This will ensure that your plugins remain active when you copy them back over.

    If it's not possible to disable all plugins, try to disable at least caching and security plugins. Let us know about results.

    2. Enable wp debug. To enable WP_DEBUG, change the following line in your wp-config.php file:
    define('WP_DEBUG', false);
    To this:

    // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    // Disable display of errors and warnings
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    Please make sure to add the above code just before the line /* That's all, stop editing! Happy blogging. */

    After this, try to replicate issue again. Then go to /wp-content folder and check if debug.log file is there. If it's there. download it, save as debug.txt and attach to your next reply.

    KInd regards,
    Katya

  • Katya Tsihotska

    Hi Sander

    Hope you had a great day!

    Thank you for providing all needed information. Unfortunately, I wasn't able to find any clue to the issue in your debug.log. There are some errors, but they seem to be not related to the issue.

    I'm going to need to ping our SLS team (code experts) to get their valuable feedback on this issue. One of our SLS members will reply back here as soon as more information is available.

    Please keep in mind that our SLS Team deals with more complicated issues, thus it may take a little longer for them to reply here. Thank you for your patience while we look into this further.

    Kind regards,
    Katya

  • Ivan

    Hi Sander !

    It happened because your subsite adds one space at the beginning of its response all time. I found a workaround for this case but it can break other functionalities of other plugins.
    I replaced 395th line into {wordpress_folder}/wp-content/plugins/user-sync/user-sync.php file via FTP from
    if ( $hash == md5( $str . "" . $key ) ) {
    to
    if ( trim($hash) == md5( $str . "" . $key ) ) {

    Best,
    Ivan.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.