bobbingwide / oik-clone

Clone content between sites
https://www.oik-plugins.com/oik-plugins/oik-clone-clone-your-wordpress-content/
GNU General Public License v2.0
5 stars 0 forks source link

500 internal server error cloning post with invalid template #62

Open bobbingwide opened 3 years ago

bobbingwide commented 3 years ago

When I tried to clone https://s.b/wp55/thisis/2021/06/11/call-7-polished-portfolios/ it failed with a 500 internal server error.

Tracing revealed that this was due to the following message being issued in the server

/home/customer/www/bobbingwide.com/public_html/wp-content/plugins/oik-clone/admin/oik-clone-actions.php(203:0) oik_clone_update_target(3) 133 10 2021-06-12T19:36:59+00:00 0.118518 0.000342 cf=wp_ajax_nopriv_oik_clone_post 9920 53 0 10485760/10485760 768M F=780 wp_update_post result WP_Error Object

    [errors] => Array

        [invalid_page_template] => Array

            [0] => (string) "Invalid page template."

    [error_data] => Array

    [ * additional_data] => Array

This was because the page template was set to single-post-no-featured-image. I'd updated the theme on the client but not on the server.

Workaround

  1. Don't use templates which aren't defined on the server
  2. Update the theme on the server

Permanent fix

TBD