如何为class-wp-query.php追踪这些PHP通知和警告的原因?

时间:2018-03-27 作者:Robert Andrews

我的WordPress调试。日志文件中充满了这些PHP通知,间隔大约15分钟,然后是几个小时…

[23-Mar-2018 05:33:00 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3736
[23-Mar-2018 05:33:00 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3738
[23-Mar-2018 05:33:00 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3740
[23-Mar-2018 05:33:00 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3736
[23-Mar-2018 05:33:00 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3738
[23-Mar-2018 05:33:00 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3740
没有堆栈跟踪可以让我更好地了解通知的来源。因此,我在服务器上安装了Xdebug,并将其设置为“5”。现在调试。日志中充满了更详细的日志。这是上面的跟踪等价物…

[27-Mar-2018 04:30:26 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3736
[27-Mar-2018 04:30:26 UTC] PHP Stack trace:
[27-Mar-2018 04:30:26 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:26 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:26 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:26 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:26 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:26 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:26 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:26 UTC] PHP   8. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:26 UTC] PHP   9. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:26 UTC] PHP  10. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:26 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3738
[27-Mar-2018 04:30:26 UTC] PHP Stack trace:
[27-Mar-2018 04:30:26 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:26 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:26 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:26 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:26 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:26 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:26 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:26 UTC] PHP   8. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:26 UTC] PHP   9. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:26 UTC] PHP  10. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:26 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3740
[27-Mar-2018 04:30:26 UTC] PHP Stack trace:
[27-Mar-2018 04:30:26 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:26 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:26 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:26 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:26 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:26 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:26 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:26 UTC] PHP   8. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:26 UTC] PHP   9. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:26 UTC] PHP  10. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:26 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3736
[27-Mar-2018 04:30:26 UTC] PHP Stack trace:
[27-Mar-2018 04:30:26 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:26 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:26 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:26 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:26 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:26 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:26 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:26 UTC] PHP   8. redirect_canonical() /home/mysite/public_html/wp-includes/canonical.php:532
[27-Mar-2018 04:30:26 UTC] PHP   9. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:26 UTC] PHP  10. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:26 UTC] PHP  11. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:26 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3738
[27-Mar-2018 04:30:26 UTC] PHP Stack trace:
[27-Mar-2018 04:30:26 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:26 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:26 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:26 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:26 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:26 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:26 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:26 UTC] PHP   8. redirect_canonical() /home/mysite/public_html/wp-includes/canonical.php:532
[27-Mar-2018 04:30:26 UTC] PHP   9. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:26 UTC] PHP  10. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:26 UTC] PHP  11. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:26 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3740
[27-Mar-2018 04:30:26 UTC] PHP Stack trace:
[27-Mar-2018 04:30:26 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:26 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:26 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:26 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:26 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:26 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:26 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:26 UTC] PHP   8. redirect_canonical() /home/mysite/public_html/wp-includes/canonical.php:532
[27-Mar-2018 04:30:26 UTC] PHP   9. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:26 UTC] PHP  10. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:26 UTC] PHP  11. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:26 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/wp-includes/class-wp-query.php:3736) in /home/mysite/public_html/wp-includes/pluggable.php on line 1216
[27-Mar-2018 04:30:26 UTC] PHP Stack trace:
[27-Mar-2018 04:30:26 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:26 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:26 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:26 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:26 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:26 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:26 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:26 UTC] PHP   8. wp_redirect() /home/mysite/public_html/wp-includes/canonical.php:533
[27-Mar-2018 04:30:26 UTC] PHP   9. header() /home/mysite/public_html/wp-includes/pluggable.php:1216
[27-Mar-2018 04:30:28 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3736
[27-Mar-2018 04:30:28 UTC] PHP Stack trace:
[27-Mar-2018 04:30:28 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:28 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:28 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:28 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:28 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:28 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:28 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:28 UTC] PHP   8. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:28 UTC] PHP   9. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:28 UTC] PHP  10. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:28 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3738
[27-Mar-2018 04:30:28 UTC] PHP Stack trace:
[27-Mar-2018 04:30:28 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:28 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:28 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:28 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:28 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:28 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:28 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:28 UTC] PHP   8. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:28 UTC] PHP   9. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:28 UTC] PHP  10. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:28 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3740
[27-Mar-2018 04:30:28 UTC] PHP Stack trace:
[27-Mar-2018 04:30:28 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:28 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:28 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:28 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:28 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:28 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:28 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:28 UTC] PHP   8. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:28 UTC] PHP   9. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:28 UTC] PHP  10. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:28 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3736
[27-Mar-2018 04:30:28 UTC] PHP Stack trace:
[27-Mar-2018 04:30:28 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:28 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:28 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:28 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:28 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:28 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:28 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:28 UTC] PHP   8. redirect_canonical() /home/mysite/public_html/wp-includes/canonical.php:532
[27-Mar-2018 04:30:28 UTC] PHP   9. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:28 UTC] PHP  10. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:28 UTC] PHP  11. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:28 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3738
[27-Mar-2018 04:30:28 UTC] PHP Stack trace:
[27-Mar-2018 04:30:28 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:28 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:28 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:28 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:28 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:28 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:28 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:28 UTC] PHP   8. redirect_canonical() /home/mysite/public_html/wp-includes/canonical.php:532
[27-Mar-2018 04:30:28 UTC] PHP   9. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:28 UTC] PHP  10. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:28 UTC] PHP  11. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:28 UTC] PHP Notice:  Trying to get property of non-object in /home/mysite/public_html/wp-includes/class-wp-query.php on line 3740
[27-Mar-2018 04:30:28 UTC] PHP Stack trace:
[27-Mar-2018 04:30:28 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:28 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:28 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:28 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:28 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:28 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:28 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:28 UTC] PHP   8. redirect_canonical() /home/mysite/public_html/wp-includes/canonical.php:532
[27-Mar-2018 04:30:28 UTC] PHP   9. is_front_page() /home/mysite/public_html/wp-includes/canonical.php:433
[27-Mar-2018 04:30:28 UTC] PHP  10. WP_Query->is_front_page() /home/mysite/public_html/wp-includes/query.php:410
[27-Mar-2018 04:30:28 UTC] PHP  11. WP_Query->is_page() /home/mysite/public_html/wp-includes/class-wp-query.php:3674
[27-Mar-2018 04:30:28 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/wp-includes/class-wp-query.php:3736) in /home/mysite/public_html/wp-includes/pluggable.php on line 1216
[27-Mar-2018 04:30:28 UTC] PHP Stack trace:
[27-Mar-2018 04:30:28 UTC] PHP   1. {main}() /home/mysite/public_html/index.php:0
[27-Mar-2018 04:30:28 UTC] PHP   2. require() /home/mysite/public_html/index.php:17
[27-Mar-2018 04:30:28 UTC] PHP   3. require_once() /home/mysite/public_html/wp-blog-header.php:19
[27-Mar-2018 04:30:28 UTC] PHP   4. do_action() /home/mysite/public_html/wp-includes/template-loader.php:12
[27-Mar-2018 04:30:28 UTC] PHP   5. WP_Hook->do_action() /home/mysite/public_html/wp-includes/plugin.php:453
[27-Mar-2018 04:30:28 UTC] PHP   6. WP_Hook->apply_filters() /home/mysite/public_html/wp-includes/class-wp-hook.php:310
[27-Mar-2018 04:30:28 UTC] PHP   7. redirect_canonical() /home/mysite/public_html/wp-includes/class-wp-hook.php:286
[27-Mar-2018 04:30:28 UTC] PHP   8. wp_redirect() /home/mysite/public_html/wp-includes/canonical.php:533
[27-Mar-2018 04:30:28 UTC] PHP   9. header() /home/mysite/public_html/wp-includes/pluggable.php:1216
我不太明白问题是什么。我的意思是,这里提到了canonical和plugin。php,到博客标题。我也明白了is_page 在那里。

我想知道的一件事是,这是否与高级自定义字段有关。我将ACF字段组设置为显示在页面编辑屏幕上。我已经写了我的页面。php主题文件,根据保存在后端的内容输出内容。

该站点也是WordPress Multisite的子站点,那么canonical在这里有角色吗?

我也知道"Cannot modify header information - headers already sent" 有时可能表示插件文件末尾有多余的空间。

但是,根据收集到的证据,我仍然不知道下一步该怎么办。

谢谢

1 个回复
SO网友:AA-T

几周来,我一直在努力解决这个问题,最终我发现了是什么导致了这个问题。这是woocommerce插件,所以您可能想尝试禁用它,看看您是否也会遇到这种情况。

我已经在woocommerce开了一张支持票:https://wordpress.org/support/topic/major-database-issues-server-chrash/

编辑:我必须给woocommerce多一点信任,因为(在我的情况下)woocommerce与服务器设置(apache和mysql)的结合已经完全过时了。

Furthermore, the notice seems to be a know issue that hasn\'t been resolved yet, see: https://github.com/woocommerce/woocommerce/issues/21756

结束

相关推荐

WordPress Plugins won't save

我有一个WordPress网站,我刚刚接管了一个客户,因此我没有能力与以前的网站管理员/开发人员交谈。该网站使用的是YOOtheme对Subway稍加修改的版本。为了更新插件位置,Subway的一部分有“小部件选项”。我无法更改外观或小部件显示的页面,因为我无法保存任何内容。它看起来像已保存,但没有保存,或者您会在保存按钮旁边看到“加载循环”,它一直在运行。Things to note:<WordPress和插件是最新的。在我们转移到新服务器之前,插件是可更新的。新服务器有一个max\\u inpu