• Resolved Ben Keith

    (@benlk)


    I’d like to use NS Cloner on a subdomain multisite. To test it out, I’m running NS Cloner on a Docker-hosted subdomain multisite on my own computer, in a local development environment.

    No AJAX request made by NS Cloner seems to work. For example, the “NS Cloner Statistics” modal with the “Yes, Share”, “Yes, Share Anonymously”, and “No, Dismiss” buttons does not work. In the browser console, I see that the browser makes a request to the site’s admin-ajax endpoint with this payload:

    action: ns_cloner_save_analytics_mode
    nonce: 8b9a9cea84
    mode: no_share

    The request returns 400, and the modal never dismisses.

    If I manually remove the modal from the page using the browser inspector, the big “Clone” button also does not work. Filling out the clone form results in more errors in the browser console. The check that the new domain name is available makes a request to wp-admin/admin-ajax.php?flag=ns_cloner_validate_section and returns 400.

    Clicking the big “Clone” button fires a request to wp-admin/admin-ajax.php?flag=ns_cloner_process_init with an appropriate-looking payload, and this also returns 400.

    The NS Cloner Logs/Status page shows no logs or in-progress cloning operations.

    Other admin-ajax.php requests on this site and on this page, such as wp-auth-check, succeed.

    No NS Cloner request results in information being written to the site’s debug log. These 400s are not causing PHP errors.

    There is one notice in the admin that _maybe_ seems relevant:

    It appears you have HTTP basic auth or something else blocking remote requests to your site, which means background cloning won’t work. The Cloner will default to AJAX processing, so you should be able to still clone sites successfully, but progress will stop if you leave this page. If you have basic auth enabled, you can add a workaround. Error: cURL error 60: SSL certificate problem: unable to get local issuer certificate.

    The workaround link is a 404 page.

    Site details:

    • WordPress: 6.1.1
    • PHP: 8.0.18
    • Web server: nginx/1.21.4
    • NS Cloner version: 4.2.2.1

    Browser details:

    • Chrome 109
    • This topic was modified 2 years ago by Ben Keith.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Never Settle

    (@neversettle)

    Hey @benlk ,

    Do you have any password protection setup on your multisite installation? The 400 errors would mean there is some auth firewall that is configured on your site. Please check this article https://support.neversettle.it/article/16-cloning-on-a-password-protected-site on how to bypass this restriction.

    Looking forward to your response.

    Warm Regards

    Thread Starter Ben Keith

    (@benlk)

    There is no password protection set up on this multisite, and in any case, I am currently logged into the multisite as a super-admin. The requests are being made in the same tab as the NS Cloner admin page, where I am logged in. I am getting 400 responses for any NS Cloner AJAX request at all, not just the requests that NS Cloner uses to clone.

    The AJAX request to set the statistics preference fails with a 400, for example.

    • This reply was modified 2 years ago by Ben Keith.
    Plugin Author Never Settle

    (@neversettle)

    Hey @benlk ,

    The 400 error shows a bad response that could be an error generated from a some code or configuration. Please check if there are any error logs generated during the process. You can use the Query Monitor plugin or enable WordPress debug logs

    Thread Starter Ben Keith

    (@benlk)

    No error logs or messages are generated during the process. No messages are written to the site’s debug log. I am running the site with WP_DEBUG and WP_DEBUG_LOG enabled, and I’m watching the error log for updates.

    AJAX requests made by other plugins succeed, and AJAX requests made by WordPress core succeed. This problem is unique to NS Cloner’s AJAX requests.

    Thread Starter Ben Keith

    (@benlk)

    Found the cause of the problem:

    The multisite was registered under example.test, with three additional sites: one.example.test, two.example.test, three.example.test. In the wp_blogs table, each site used the correct domain name. However, in the wp_options table for the primary site example.test , the site_url and home_url were one.example.test.

    As a result, when viewing the NS Cloner admin page at https://example.test/wp-admin/network/admin.php?page=ns-cloner, the admin-ajax queries were directed to one.example.test , which rejected them.

    Plugin Author Never Settle

    (@neversettle)

    Thanks for the update @benlk ??

    Hi,

    I have this exact same error, but at the end it says:

    Error: cURL error 28: Operation timed out after 2001 milliseconds with 0 bytes received.

    So full error is

    It appears you have HTTP basic auth or something else blocking remote requests to your site, which means background cloning won’t work. The Cloner will default to AJAX processing, so you should be able to still clone sites successfully, but progress will stop if you leave this page. If you have basic auth enabled, you can?add a workaround. Error: cURL error 28: Operation timed out after 2001 milliseconds with 0 bytes received.

    The work around link is not working. Can anyone assist or advise?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘NS Cloner not cloning; all AJAX requests 400 without log’ is closed to new replies.