• Resolved letoniusz

    (@letoniusz)


    I noticed that the following message appears quite often (several times a day) in the server logs:

    [Thu Aug 15 18:39:13.449556 2024] [proxy_fcgi:error] [pid 30402:tid 30455] [client xxx.239.24.219:0] AH01071: Got error 'PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1622; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1623; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1624; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1625; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1634; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1634'

    I checked these lines in the wc-template-functions.php file

                'data-src'                => esc_url( $full_src[0] ),
                'data-large_image'        => esc_url( $full_src[0] ),
                'data-large_image_width'  => esc_attr( $full_src[1] ),
                'data-large_image_height' => esc_attr( $full_src[2] ),
    return '<div data-thumb="' . esc_url( $thumbnail_src[0] ) . '" data-thumb-alt="' . esc_attr( $alt_text ) . '" class="woocommerce-product-gallery__image"><a href="' . esc_url( $full_src[0] ) . '">' . $image . '</a></div>';}

    What does this warning mean? Is there any way I can fix it?

    • This topic was modified 3 months, 2 weeks ago by letoniusz.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Hey there, @letoniusz! Thanks for contacting us. I’m happy to help you.

    The lines you mentioned in the wc-template-functions.php file are related to the product image gallery in WooCommerce. Specifically, WooCommerce is trying to load image data for a product, but for some reason, the expected data (like the image URL or dimensions) is missing or not being retrieved correctly.

    There are a few different reasons for this to happen. Let’s start by trying to refresh the data to see if this solves the issue.

    Can you please head over to WooCommerce → Status → Tools, and do the following:

    WooCommerce transients – Clear
    Expired transients – Clear
    Clear template cache – Clear
    Capabilities – Reset Capabilities
    Clear customer sessions -Clear

    Please let us know how it goes.

    Have a wonderful day!

    Thread Starter letoniusz

    (@letoniusz)

    I made it. We will see. What is interesting more – Most of these errors are related to the “Client IP” which is the server’s IP. The others I’ve found so far are IPs known on the internet as “spam”.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello letoniusz,

    Thank you for your reply.

    To confirm, did the solution suggested in the last message fix the issue?
    You may check for log entries other than the one created on “Thu Aug 15 18:39:13”.

    Regarding the other errors you mentioned, could you the log entries for these errors?
    Once I have more details, I will be happy to assist you further.

    Looking forward to your response. ??

    Best regards.

    Thread Starter letoniusz

    (@letoniusz)

    I cleared that things today before 8 am.

    Right now I checked logs for errors:

    [at Aug 17 12:35:16.705227 2024] [proxy_fcgi:error] [pid 11212:tid 11265] [client 145.239.24.219:0] AH01071: Got error 'PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1622; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1623; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1624; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1625; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1634; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1634'

    [Sat Aug 17 12:35:18.767405 2024] [proxy_fcgi:error] [pid 11213:tid 11238] [client 145.239.24.219:0] AH01071: Got error 'PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1622; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1623; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1624; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1625; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1634; PHP message: PHP Warning: Trying to access array offset on false in /home/klarsan/web/filtry-do-wody.info/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php on line 1634'

    What is interesting – IP 145.239.24.219 – is my host.

    Hey, @letoniusz!

    What is interesting – IP 145.239.24.219 – is my host.

    Have you reached out to them to see if everything is okay on their end?

    Since the issue persisted after refreshing the data, the next step is to run a conflict test to see if the issue persists.

    To test, you’ll first want to change the theme on your site to Storefront, then check to see if the issue is still present. If that resolves the issue, you’ll want to get in touch with your theme’s developer and see if they have an update or fix for you.

    If changing the theme doesn’t help, you’ll want to deactivate all plugins except for WooCommerce and take a look. If that fixes the problem, re-enable the other plugins one by one (gradually), checking after each, to see where the issue is coming from.

    — Be sure you have a good backup in place of your full site and database. You can ask your host for backup functionality or you can consider using a service like Jetpack. If something goes wrong, you will be able to restore it.

    — It is important to consider as well a staging functionality in case you would not like to touch your production site (you can ask your host if they offer this service), or you can use WP Staging for quickly spinning up a new test site.

    You can find more about this in this guide.

    Please let us know about your findings.

    Have a wonderful day!

    Hi, @letoniusz.

    Did the suggestions of @carolm29 help?

    I’ve had the same problem on a clients site for some days now:

    [02-Sep-2024 00:42:59 UTC] PHP Warning: Trying to access array offset on false in C:\inetpub\example.com\wp-content\plugins\woocommerce\includes\wc-template-functions.php on line 1623
    [02-Sep-2024 00:42:59 UTC] PHP Warning: Trying to access array offset on false in C:\inetpub\example.com\wp-content\plugins\woocommerce\includes\wc-template-functions.php on line 1624
    [02-Sep-2024 00:42:59 UTC] PHP Warning: Trying to access array offset on false in C:\inetpub\example.com\wp-content\plugins\woocommerce\includes\wc-template-functions.php on line 1625
    [02-Sep-2024 00:42:59 UTC] PHP Warning: Trying to access array offset on false in C:\inetpub\example.com\wp-content\plugins\woocommerce\includes\wc-template-functions.php on line 1626
    [02-Sep-2024 00:42:59 UTC] PHP Warning: Trying to access array offset on false in C:\inetpub\example.com\wp-content\plugins\woocommerce\includes\wc-template-functions.php on line 1635

    Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @vitsupport,

    Sorry to hear that you are experiencing a similar issue.

    Per WordPress forum guidelines, would you mind opening up a new thread for this so that we can keep things organized and offer more personalized support for you? We’ll be happy to help you out with this over there!

    Have a wonderful day!

    Hi, @rajeshml

    Thanks for your reply; I just wanted to see If the sollution worked for that user, before asking you the same question. ?? I’ve created a separate thread now.

    You have a nice day too!

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