Cloner not cloning Attributes from WooCommerce

Hi

I have cloned my clients website. He is using WooCommerce. Everything has been cloned, also the variables, however the attributes are not being cloned. How come?

Sincerely,

Mika

  • Predrag Dubajic
    • Support

    Hey Mika,

    Hope you’re doing well today :slight_smile:

    I just cloned woo subsite on my test network installation and the attributes were transferred as well so I’m not sure why this is not working on your installation.

    Would you mind allowing support access so we can have a closer look at this?

    To enable support access you can follow this guide here:

    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Best regards,

    Predrag

  • Mika
    • The Bug Hunter

    Hi Predrag

    Good to hear from you. I am doing much better than I deserve.

    I also hope everything is well with you :slight_smile:

    I have just granted you access so you can check out the issue.

    I hope to hear from you soon on this matter!

    Sincerely,

    Mika

  • Milan
    • WordPress Wizard

    Hey Mika.

    Glad to know that you are well and fortunately Predrag is also fine. :slight_smile:

    When I visited your site, Cloner was not active, so I activated it and cloned your no named subsite to wpmutest subsite. All the attributes of Woocommerce products gets cloned there without any issue. I left cloned site as it is for your confirmation.

    Can you please try one more time and let me know how it goes. Just note that, I had to wait for 5-10 minutes to let Cloner complete its job. Please do not close windows when cloning is on. :slight_smile:

    Let me know how it goes. :slight_smile:

    Cheers,

    Milan

  • Predrag Dubajic
    • Support

    Hi Mika,

    Can you tell me which product we could be looking at for this?

    I did another test on your network and you can see that I have created wpmuwoo and wpmuwooclone subsites, in first one I added product with variations and you can see that in clone both attributes and variables are cloned properly.

    If I’m missing anything on that test site please let me know.

    Best regards,

    Predrag

  • Mika
    • The Bug Hunter

    Hi Predrag

    Good to hear from you.

    Please make a Clon of the .com site. Then check out the first products.

    Also, you and do the same with the current .com and .dk website. You will see that Variations are missing on the .dk website.

    Sincerely,

    Mika

  • Predrag Dubajic
    • Support

    Hi Mika,

    I did couple of more tests and I’m even more confused about this now :smiley:

    What I did is assigned variables to first product in the test site Milan created earlier and then cloned that site, variations were there now, so it look like this is related to the main site only.

    Can you enable debug log in your wp-config.php by replacing define(‘WP_DEBUG’, false); with this code:

    // 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 );

    Run the cloning process of main site and this should create debug.log file in your wp-content folder that could tell us what is going on.

    Can you please save it as .txt file and attach it here so we can check it out.

    Best regards,

    Predrag

  • Predrag Dubajic
    • Support

    Hi Mika,

    This is really strange and I’m kinda getting lost here so I have flagged this thread for our second level support guys to have a look.

    In the meantime could you get in touch with your hosting provider and see if there’s anything in server logs that could tell us what’s going on?

    Also, could you send us your FTP login details so devs can debug it further?

    You can send us your details using our contact form https://premium.wpmudev.org/contact/ and the template below:

    IMPORTANT: Make sure you select “I have a different question” for your topic so it doesn’t go back to forums – this and the subject line ensure that it gets assigned to me.

    Subject: “Attn: Predrag Dubajic

    – WordPress admin username

    – WordPress admin password

    – Login url

    – FTP credentials (host/username/password)

    – Link back to this thread for reference

    – Any other relevant urls

    One more thing you can try as a workaround in the meantime is to use Snapshot plugin to create a backup of your main site and restore it to subsite.

    Best regards,

    Predrag

  • Predrag Dubajic
    • Support

    Hi Mika,

    Thanks, I have forwarded those to our developers.

    Please use one of the tests sites first to restore the snapshot, but not the wpmutest one as that's probably what SLS guys will need for testing.

    When you go to list of your snapshots hover on the existing snapshot and click on restore, you should now see list of all snapshots for that specific site, in your case it will probably be only one, so hover again and click restore one more time.

    Now click on Change button next to Site URL where you can enter ID of the site you want to restore to.

    Best regards,

    Predrag

  • Panos
    • SLS

    Hi Mika ,

    I tried replicating and noticed similar issue, not the exact tables you mention though, it was table “woocommerce_sessions”.

    I managed to fix this in my installation by slightly editing file wp-content/plugins/cloner/copier/class.copier-tables.php

    I have attached it here so you can replace it and test it and see if it is cloning properly now. You will need to uncompress (unzip) it after you download it to your desktop.

    Please let us know how this goes :slight_smile:

    Kind regards,

    Panos

  • Panos
    • SLS

    Hi Mika,

    I see… That’s not the case in my testings.

    Since I can’t replicate this, I would need to do some further testing on your installation but I see that you have already resolved your issue with Snapshot. So just in case you would like us to check it out, I would need to do several “clones” end each time try and locate if there is any error thrown which blocks the process.

    Before I go on I would need your approval for this and also your confirmation that you have kept a backup. It would be the best if you had a similar installation on the same server so I don’t run the tests on your live site. If you don’t have I would recommend, if it’s not a problem for you, to create a new WP multisite installation in a sub-folder where I could run the tests. It’s generally considered good practice having a testing/staging site :slight_smile:

    If you decide to create a new testing site I would need to have your admin and ftp credetials. You can send them again through our contact form by selecting “I have a different question” at the topic and as a subject use “Attn: Panos Lyrakis”. Also don’t forget to include a link back here.

    If not, I can use credentials Predrag has sent me :slight_smile:

    Please advise!

    Thanks,

    Panos

  • Mika
    • The Bug Hunter

    Hi Panos

    I am sorry. I am not able to give you the permission to do this on my clients website.

    However, wouldn’t you be able to debug this on your own since it seems to be an issue with the actual plugin?

    Sincerely,

    Mika

  • Panos
    • SLS

    Hi Mika,

    I understand your client’s hesitation regarding permissions.

    Let me first try explain the nature of this issue. It’s not actually a bug of the plugin, the plugin uses valid SQL queries in order to clone sites, but there are some occasions of custom tables that for some reason they throw errors. I managed to spot this same issue in some custom tables that were created by specific third party plugins.

    If this fix doesn’t work in your case then I’ll need to do these tests metnioned in my previous reply in order to spot at which part of the cloning process this issue arises.

    I repeat here that I can’t replicate this in any of my testing environments so the only way is to have access in a similar environment as your client’s.

    Again the best option would be if you could install a new WordPress multisite in a sub-folder of your site and provide access to that site.

    Please advise.

    Kind regards,

    Panos

  • Mika
    • The Bug Hunter

    Hi

    Thanks for your reply Panos.

    In this case, since we are a bit pressed with time. We will leave it and then use the SnapShot which does the work very well as well :slight_smile:

    Thanks for all your time!!

    Sincerely,

    Mika

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.