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

Warning when cloning oik-read-more #73

Open bobbingwide opened 11 months ago

bobbingwide commented 11 months ago

When cloning oik-read-more v0.2.4 I got a couple of warning messages.

Warning: foreach() argument must be of type array|object, bool given in C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\admin\class-oik-clone-relationships.php on line 81

Warning: foreach() argument must be of type array|object, bool given in C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\admin\class-oik-clone-relationships.php on line 81

Initial problem determination

For some reason the cloning messages said: Cloning 48455 and Cloning 1. I don't know why it said Cloning 1.

bobbingwide commented 11 months ago
0. bw_lazy_backtrace C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\bwtrace.php:108 0
1. bw_backtrace C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\bwtrace-actions.php:293 0
2. bw_trace_error_handler(2,foreach() argument must be of type array|object, bool given,C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\admin\class-oik-clone-relationships.php,81) C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\admin\class-oik-clone-relationships.php:81 4
3. filter_metadata(array,object) C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php:310 2
4. apply_filters(array,array) C:\apache\htdocs\oikcom\wp-includes\plugin.php:205 2
5. apply_filters(oik_clone_build_list,array,object) C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\admin\class-oik-clone-relationships.php:65 3
6. build_list(object) C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\admin\oik-clone-relationships.php:68 1
7. oik_clone_relationships(object) C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\admin\oik-save-post.php:153 1
8. oik_clone_clone(1,,array) C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\admin\class-oik-clone-tree-node.php:301 3
9. cloneme C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\admin\class-oik-clone-tree.php:400 0
10. clone_these(array) C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\shortcodes\oik-clone.php:65 1
11. oik_clone_maybe_perform_clones(48455,array) C:\apache\htdocs\wordpress\wp-content\plugins\oik-clone\shortcodes\oik-clone.php:128 2
12. oik_clone(array,,clone) C:\apache\htdocs\wordpress\wp-content\plugins\oik\libs\oik-shortcodes.php:229 3
13. bw_shortcode_event(array,,clone) C:\apache\htdocs\oikcom\wp-includes\shortcodes.php:395 3
14. do_shortcode_tag(array) C:\apache\htdocs\oikcom\wp-includes\shortcodes.php:0 1
15. preg_replace_callback(/\[(\[?)(cloned|clone)(?![\w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]*+(?:\[(?!\/\2\])[^\[]*+)*+)\[\/\2\])?)(\]?)/,do_shortcode_tag,[clone]
[cloned]) C:\apache\htdocs\oikcom\wp-includes\shortcodes.php:235 3
16. do_shortcode([clone]
[cloned]) C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php:312 1
17. apply_filters([clone]
[cloned],array) C:\apache\htdocs\oikcom\wp-includes\plugin.php:205 2
18. apply_filters(widget_text,[clone]
[cloned],array,object) C:\apache\htdocs\oikcom\wp-includes\widgets\class-wp-widget-text.php:283 4
19. widget(array,array) C:\apache\htdocs\oikcom\wp-includes\class-wp-widget.php:394 2
20. display_callback(array,array) C:\apache\htdocs\oikcom\wp-includes\widgets.php:837 2
21. dynamic_sidebar(footer-5) C:\apache\htdocs\wordpress\wp-content\themes\genesis\lib\structure\footer.php:85 1
22. genesis_footer_widget_areas() C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php:310 1
23. apply_filters(,array) C:\apache\htdocs\oikcom\wp-includes\class-wp-hook.php:334 2
24. do_action(array) C:\apache\htdocs\oikcom\wp-includes\plugin.php:517 1
25. do_action(genesis_before_footer) C:\apache\htdocs\wordpress\wp-content\themes\genesis\footer.php:27 1
26. require_once(C:\apache\htdocs\wordpress\wp-content\themes\genesis\footer.php) C:\apache\htdocs\oikcom\wp-includes\template.php:785 1
27. load_template(C:\apache\htdocs\oikcom/wp-content/themes/genesis/footer.php,1,array) C:\apache\htdocs\oikcom\wp-includes\template.php:720 3
28. locate_template(array,1,1,array) C:\apache\htdocs\oikcom\wp-includes\general-template.php:92 4
29. get_footer C:\apache\htdocs\wordpress\wp-content\themes\genesis\lib\framework.php:103 0
30. genesis C:\apache\htdocs\wordpress\wp-content\themes\genesis-oik\single-oik_pluginversion.php:58 0
31. include(C:\apache\htdocs\wordpress\wp-content\themes\genesis-oik\single-oik_pluginversion.php) C:\apache\htdocs\oikcom\wp-includes\template-loader.php:106 1
32. require_once(C:\apache\htdocs\oikcom\wp-includes\template-loader.php) C:\apache\htdocs\oikcom\wp-blog-header.php:19 1
33. require(C:\apache\htdocs\oikcom\wp-blog-header.php) C:\apache\htdocs\oikcom\index.php:17 1
bobbingwide commented 11 months ago

I don't know why it said Cloning 1.

I've repeated the experiment. The logic appears to be attempting to clone post 1, which is a related post, but it marked as n/a... meaning it's not supposed to be cloned.

Note: The target cloned posts are OK.