• Resolved zonezero

    (@zonezero)


    Free edition, version 2.21.0, Installed on 17th of December.
    PHP version 8.2
    Since that day, for every front-end page view the following error/warning gets recorded:

    FastCGI sent in stderr: "PHP message: PHP Warning: ?Attempt to read property "id" on null in $HOST/wp-content/plugins/yith-woocommerce-order-tracking/incl
    udes/class.yith-woocommerce-order-tracking.php on line 254" while reading response header from upstream, client: $CUSTOMER_IP, server: $SERVER, request: "GET /veikals/produkta-kategorija/makeup/acim-makeup/acu-zimuli-un-laineri/ HTTP/2
    .0", upstream: "fastcgi://unix:/run/php/php8.2-fpm-$SERVER.sock:", host: "$SERVER", referrer: "https://$SERVER/products/kiko-lasting-mousse-eyeshadow-acu-enas/"

    This warning/error is not logged for front page.
    Is logged for any other product page, shop catalogue page, cart page.
    Error is logged for both registered users and guests.
    After rolling back to version 2.20.0, this error log spam stops immediately.

    If any additional information is required, don’t hesitate to ask.
    Kind regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    we hope you’re doing well!

    Please replace lines 254-256 of the file located in the directory \wp-content\plugins\yith-woocommerce-order-tracking\includes\class.yith-woocommerce-order-tracking.php with the following code :

    if ( function_exists( 'get_current_screen' ) ) {
        $current_screen_id = get_current_screen() ? get_current_screen()->id : '';
    
        $if_shop_order = function_exists( 'wc_get_page_screen_id' ) ? wc_get_page_screen_id( 'shop-order' ) === $current_screen_id : 'shop-order' === $current_screen_id;
    }

    Please try it and tell me any news.

    Best regards.

    Thread Starter zonezero

    (@zonezero)

    Hello.
    Thank you for your reply.

    After applying the suggested change and short testing session, the error log stays silent and the aforementioned error is not generated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Same error for any shop page view’ is closed to new replies.