• Hi there!

    I couldn’t get this working …

    I followed the tutorial:
    https://plugins.miniorange.com/nextcloud-wordpress-remote-user-sync

    Everything fine, but no user will be created on Nextcloud.

    If I click “Test configuration” I get a new window with just an WP error saying:
    “Test unsuccessfull because code => message => Test Configuration for following server does not exist”

    This seem to be placeholders for more helpful things, I think. What can I do now? Any advice? Any idea what is going wrong here?

    Thanks in advance for your help!

    All the best
    Torsten

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Torsten Landsiedel

    (@zodiac1978)

    I think it is unrelated, but in mo-user-sync-view.php the use of wp_nonce_field() is wrong. This function is not returning the nonce value, but the complete markup.

    See: https://developer.www.ads-software.com/reference/functions/wp_nonce_field/

    That is why you support form has broken markup:

    <input type="hidden" name="nonce_" value="<input type=" hidden"="" id="_wpnonce"><input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=wp_to_remote_user_sync&amp;tab=sp_config&amp;attributeMapping=0&amp;remote_server_id=1"><input type="hidden" id="_wpnonce" name="_wpnonce" value="82bc148e42"><input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=wp_to_remote_user_sync&amp;tab=sp_config&amp;attributeMapping=0&amp;remote_server_id=1">"&gt;

    Thread Starter Torsten Landsiedel

    (@zodiac1978)

    Okay, after some late night debugging I know a little bit more …

    The button to test the configuration is only working for “Tableau”. Every other system (Nextcloud in my case) is getting the “Test Configuration for following server does not exist” error message. So this doesn’t help at all. It is just stating that the button is doing nothing. Not so obvious, but after looking in the source code it is very clear. Why not just hide the button in this case?

    There is no manual sync possible with the bulk action. In the file mo-user-sync-bulk-action-handler.php the function mo_user_sync_create_user_in_remote_server is called for every user id that is checked. This function is defined in mo-user-sync-http-requests-handler.php and unfortunately there is a check in it: if (!empty($triggers))– so this code is skipped if there is no trigger. But the trigger is only there, if you have activated the automatic sync on creation, and then the bulk action disappears. So there is no way to sync existing users manually at the moment.

    I placed some error_log() calls in the plugin to understand why it fails in my case and it seems to be just a wrong password. After pasting it again, it works.

    So my issue is resolved, but after finding so many bugs/problems in this code, I’m very disappointed with the code quality …

    Thread Starter Torsten Landsiedel

    (@zodiac1978)

    Another problem I found:

    If you save the configuration, the status always switches to “Deactivated”. You must re-save the “Attribute mapping” to get the status to “Active”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sync is not working’ is closed to new replies.