• In file classes/apirequest.php
    Line 710 better be:
    'post_status' => 'inherit',

    (following code will upload all related attachments to the new site however it’s NOT compatible with Attachments Plugin,and also has lots of bugs. So the following code is not recommended)

    foreach ($post_children as $child_id => $child_post) {
    	$attach_id = $child_id;
            if($attach_id != 0)
    	$this->send_media($child_post->guid, $post_id, $post_thumbnail_id, $attach_id);
    }

    And same file Line 716 -> Line 789 has a logic bug! what if the image is just an external link? and what if image is not added by Add Media then class attribute does not generate?

    Actually Line 716 -> Line 789 can be removed if you DO NOT need upload files to new site.
    Meanwhile, you should also remove line 330 in file classes/apicontroller.php.
    Then links(images) will become external links refered to the old site’s media library.

    • This topic was modified 7 years, 11 months ago by llb0536.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ServerPress

    (@serverpress)

    Hi llb0536,

    Thanks for taking a look at WPSiteSync!

    We would like to ask you to submit a support request at https://serverpress.com/contact/ for these issues so that we can better track them. We do have some questions about what you have submitted here. Also, if you could submit a pull request via our public repository for WPSiteSync at https://github.com/ServerPress/wpsitesync that would help to get a better idea of the exact code changes you’re suggesting.

    Once you’ve done that, we’d appreciate it if you could mark this issue as resolved here in the WP forums.

    Thanks and we look forward to working with you on these issues to make WPSiteSync a better product.

    Plugin Author ServerPress

    (@serverpress)

    Hi llb0536,

    Checking in again to see if you could please take the time to submit a pull request at https://github.com/ServerPress/wpsitesync for your changes. We have reviewed your proposed changes but we’re having trouble verifying what the effects would be. So a pull request would give us a much clearer view of what you’re suggesting.

    Specifically, the logic issue in lines 716..789 is not a bug but rather intentional. We only want to Push attachments that are part of the Source site (i.e. in the Media Library or somewhere else on the Source site’s domain) and not external references. This is because those external references will still be external references on the Target site. But local images do need to be Pushed, so this part of the code looks for those and sets them up to be sent along with the content.

    We do, however, need to upload files (images or PDFs) to the Target site as these can be changed on the Source site. The Target site’s logic in handling these requests will replace the modified resource references to make all of the content on the Source match on the Target.

    And the code on line 330 of apicontroller.php is already commented out so removing it has no real effect. The references to the Source site’s domain are correctly updated with the Target site’s domain in another area.

    We don’t believe any of these are problems and we have not had any customers reporting issues in these areas. But we’d really appreciate the opportunty to work with you on these and clear up any problems if they do indeed exist.

    Thanks for your interest and we hope to hear from you soon.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bugs!!’ is closed to new replies.