Support » Plugin: WP Super Cache » Some errors

  • Get some errors when debug mode is on.
    Wordpress v5.1.1

    WPSC v1.6.4
    Expert Mode = on
    mod-rewrite = on

    Error log:
    [25-Mar-2019 21:45:18 UTC] PHP Notice: Undefined property: WP_Post::$filter in /domain.com/wp-includes/class-wp-post.php on line 342
    [25-Mar-2019 21:45:18 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /domain.com/wp-includes/class-wp-post.php:342) in /domain.com/wp-includes/pluggable.php on line 1251
    [25-Mar-2019 21:45:18 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /domain.com/wp-includes/class-wp-post.php:342) in /domain.com/wp-includes/pluggable.php on line 1254

Viewing 8 replies - 1 through 8 (of 8 total)
  • PHP Warnings (headers already sent by) are consequence of first PHP notice. I didn’t notice something similar in my logs.

    Could you provide back-trace for PHP notice? This gist will explain how to enable the back-trace in your website: https://gist.github.com/jrfnl/5925642

    Hello,
    This is the back-trace log.
    Forget to say this errors show when deleting a page!

    [27-Mar-2019 18:17:21 UTC] Backtrace from warning 'Undefined property: WP_Post::$filter' at /domain.com/wp-includes/class-wp-post.php 342: /domain.com/wp-includes/class-wp-post.php 358 calling __get() | /domain.com/wp-includes/post.php 730 calling filter() | /domain.com/wp-content/plugins/wp-super-cache/wp-cache-phase2.php 2638 calling get_post() | /domain.com/wp-content/plugins/wp-super-cache/wp-cache-phase2.php 2741 calling wpsc_delete_post_archives() | /domain.com/wp-includes/class-wp-hook.php 286 calling wpsc_post_transition() | /domain.com/wp-includes/class-wp-hook.php 310 calling apply_filters() | /domain.com/wp-includes/plugin.php 465 calling do_action() | /domain.com/wp-includes/post.php 4446 calling do_action() | /domain.com/wp-includes/post.php 3852 calling wp_transition_post_status() | /domain.com/wp-includes/post.php 4028 calling wp_insert_post() | /domain.com/wp-includes/post.php 2988 calling wp_update_post() | /domain.com/wp-admin/post.php 249 calling wp_trash_post()
    [27-Mar-2019 18:17:21 UTC] PHP Notice:  Undefined property: WP_Post::$filter in /domain.com/wp-includes/class-wp-post.php on line 342
    [27-Mar-2019 18:17:21 UTC] PHP Stack trace:
    [27-Mar-2019 18:17:21 UTC] PHP   1. {main}() /domain.com/wp-admin/post.php:0
    [27-Mar-2019 18:17:21 UTC] PHP   2. wp_trash_post() /domain.com/wp-admin/post.php:249
    [27-Mar-2019 18:17:21 UTC] PHP   3. wp_update_post() /domain.com/wp-includes/post.php:2988
    [27-Mar-2019 18:17:21 UTC] PHP   4. wp_insert_post() /domain.com/wp-includes/post.php:4028
    [27-Mar-2019 18:17:21 UTC] PHP   5. wp_transition_post_status() /domain.com/wp-includes/post.php:3852
    [27-Mar-2019 18:17:21 UTC] PHP   6. do_action() /domain.com/wp-includes/post.php:4446
    [27-Mar-2019 18:17:21 UTC] PHP   7. WP_Hook->do_action() /domain.com/wp-includes/plugin.php:465
    [27-Mar-2019 18:17:21 UTC] PHP   8. WP_Hook->apply_filters() /domain.com/wp-includes/class-wp-hook.php:310
    [27-Mar-2019 18:17:21 UTC] PHP   9. wpsc_post_transition() /domain.com/wp-includes/class-wp-hook.php:286
    [27-Mar-2019 18:17:21 UTC] PHP  10. wpsc_delete_post_archives() /domain.com/wp-content/plugins/wp-super-cache/wp-cache-phase2.php:2741
    [27-Mar-2019 18:17:21 UTC] PHP  11. get_post() /domain.com/wp-content/plugins/wp-super-cache/wp-cache-phase2.php:2638
    [27-Mar-2019 18:17:21 UTC] PHP  12. WP_Post->filter() /domain.com/wp-includes/post.php:730
    [27-Mar-2019 18:17:21 UTC] PHP  13. WP_Post->__get() /domain.com/wp-includes/class-wp-post.php:358
    [27-Mar-2019 18:17:23 UTC] Backtrace from warning 'Cannot modify header information - headers already sent by (output started at /domain.com/wp-config.php:222)' at /domain.com/wp-includes/pluggable.php 1251: /domain.com/wp-includes/pluggable.php 1251 calling header() | /domain.com/wp-admin/post.php 259 calling wp_redirect()
    [27-Mar-2019 18:17:23 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /domain.com/wp-config.php:222) in /domain.com/wp-includes/pluggable.php on line 1251
    [27-Mar-2019 18:17:23 UTC] PHP Stack trace:
    [27-Mar-2019 18:17:23 UTC] PHP   1. {main}() /domain.com/wp-admin/post.php:0
    [27-Mar-2019 18:17:23 UTC] PHP   2. wp_redirect() /domain.com/wp-admin/post.php:259
    [27-Mar-2019 18:17:23 UTC] PHP   3. header() /domain.com/wp-includes/pluggable.php:1251
    [27-Mar-2019 18:17:23 UTC] Backtrace from warning 'Cannot modify header information - headers already sent by (output started at /domain.com/wp-config.php:222)' at /domain.com/wp-includes/pluggable.php 1254: /domain.com/wp-includes/pluggable.php 1254 calling header() | /domain.com/wp-admin/post.php 259 calling wp_redirect()
    [27-Mar-2019 18:17:23 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /domain.com/wp-config.php:222) in /domain.com/wp-includes/pluggable.php on line 1254
    [27-Mar-2019 18:17:23 UTC] PHP Stack trace:
    [27-Mar-2019 18:17:23 UTC] PHP   1. {main}() /domain.com/wp-admin/post.php:0
    [27-Mar-2019 18:17:23 UTC] PHP   2. wp_redirect() /domain.com/wp-admin/post.php:259
    [27-Mar-2019 18:17:23 UTC] PHP   3. header() /domain.com/wp-includes/pluggable.php:1254
    

    Any idea about this issue? Does WPSC need a update?!

    I was able to reproduce this issue. It seems that we need to avoid get_post in wpsc_delete_post_archives. I’ll try to create PR which will fix it.

    Same issue. following

    Plugin Author Donncha Ó Caoimh

    (@donncha)

    @kokomoweb @jsg9in9nl – can you edit wp-cache-phase2.php and look for the function “wpsc_delete_post_archives”. It should be around line 2654. The first line of that function is:

    $post = get_post( $post );

    Can you change that line, adding “@” before get_post so it looks like this:

    $post = @get_post( $post );

    That will hide the warning message you’re getting. Does that work?

    @donncha I had the same problem and your suggestion fixed it for me. Will this be fixed in next version of the plugin?

    Plugin Author Donncha Ó Caoimh

    (@donncha)

    @hjalle – yes, it will.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.