daubac402
Forum Replies Created
-
Forum: Plugins
In reply to: [Sync Post With Other Site] Simply not working :(@jaywang
1. If you see error code 500. It means that some server error has occured. So you need to check your server error log to determine what thing that cause the problem.2. In your case. I got it.
Maybe because you expose your docker container to listen on port 8000.
So your 8081 (XAMPP) site can easily connect to it.
But from docker container itself. Certainly, it run in its virtual docker bridge network, and if you try to connect to localhost:8081. Your container doesn’t see anything running on 8081 port because “localhost” now means itself (not your “localhost” of your host machine).So what you have to do is you have to change in the sync post plugin setting in docker site from “localhost:8081” to “host.docker.internal:8081”. I think it will work.
See more at: https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach- This reply was modified 2 years, 9 months ago by daubac402.
Forum: Plugins
In reply to: [Sync Post With Other Site] Simply not working :(@jaywang
Yes, I solved.
Please check your Chrome debug tool, in the Network tab, you will see 500 error after saving a post.Forum: Plugins
In reply to: [Sync Post With Other Site] Simply not working :(If I create a new post in site :8080, no error but nothing changed ??
When I update “Hello world” post then check Network log, It is a 500 error from POST request to mydomain.com:8080/wp-admin/post.php?post=1&action=edit&meta-box-loader=1&meta-box-loader-nonce=82860aa7a4&_locale=user{ "code": "internal_server_error", "message": "<p>There has been a critical error on this website. Please check your site admin email inbox for instructions.</p><p><a href=\"https://www.ads-software.com/support/article/faq-troubleshooting/\">Learn more about troubleshooting WordPress.</a></p>", "data": { "status": 500 }, "additional_errors": [] }
This is PHP error log:
PHP Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /var/www/html/wp-content/plugins/sync-post-with-other-site/includes/sps_sync.class.php:122\nStack trace:\n#0 /var/www/html/wp-includes/class-wp-hook.php(307): SPS_Sync->sps_save_post(1, Object(WP_Post), true)\n#1 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)\n#2 /var/www/html/wp-includes/plugin.php(474): WP_Hook->do_action(Array)\n#3 /var/www/html/wp-includes/post.php(4687): do_action('save_post', 1, Object(WP_Post), true)\n#4 /var/www/html/wp-includes/post.php(4789): wp_insert_post(Array, false, true)\n#5 /var/www/html/wp-admin/includes/post.php(426): wp_update_post(Array)\n#6 /var/www/html/wp-admin/post.php(227): edit_post()\n#7 {main}\n thrown in /var/www/html/wp-content/plugins/sync-post-with-other-site/includes/sps_sync.class.php on line 122, referer: https://nha201.tplinkdns.com:8080/wp-admin/post.php?post=1&action=edit
And this is $respond object at /var/www/html/wp-content/plugins/sync-post-with-other-site/includes/sps_sync.class.php on line 122
object(WP_Error)#1067 (3) { ["errors"]=> array(1) { ["http_request_failed"]=> array(1) { [0]=> string(59) "cURL error 28: Connection timed out after 5002 milliseconds" } } ["error_data"]=> array(0) { } ["additional_data":protected]=> array(0) { } } {"code":"internal_server_error","message":" There has been a critical error on this website. Please check your site admin email inbox for instructions.<\/p> Learn more about troubleshooting WordPress.<\/a><\/p>","data":{"status":500},"additional_errors":[]}