• Resolved raydelta

    (@raydelta)


    Hey, the past 2 versions of this plugin have caused this php error to show on logs and “ajax error” to flash for a moment on query monitor when updating products in Woocommerce. 3 versions before the current doesnt have this issue.

    [Wed May 17 08:00:02.569052 2023] [proxy_fcgi:error] AH01071: Got error ‘PHP message: PHP Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in [myserverdetailshere]/public_html/wp-content/plugins/facebook-for-woocommerce/includes/AJAX.php on line 199’, referer: https://mydomain.co.uk/wp-admin/post.php?post=374004&action=edit

    Is there a fix for this?

    Woocommerce 7.7.0, WordPress 6.2.1

    • This topic was modified 1 year, 6 months ago by raydelta.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Saif

    (@babylon1999)

    Hello @raydelta,

    Thank you for reaching out!

    Hey, the past 2 versions of this plugin have caused this php error to show on logs and “ajax error” to flash for a moment on query monitor when updating products in Woocommerce. 3 versions before the current doesnt have this issue.

    Warnings won’t break your site or plugins like fatal errors so you don’t need to worry unless you notice any unusual behaviour.

    Here’s a guide you can check for reference: https://raygun.com/blog/php-error-reporting/

    I also checked the line from which the warning is originating. According to the comment, the second parameter doesn’t need to be a valid callback as the error says so this could be a false positive. Also, on my test site, I can find this warning in Query Monitor.

    Could you please provide your site’s system status report? This will allow us to test if the issue is reproducible and determine whether it should be passed on to the developers.

    You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.

    Look forward to hearing back from you.

    Thread Starter raydelta

    (@raydelta)

    Hi, Yes understand PHP errors but the AJAX warning is an annoyance when updating products or posting new products which I do almost daily.

    You say that you can also see this ajax warning in Query Monitor so that is good, as it is spread wider than just me. Just note that to ignore the 159,002 failed action schedules, we once had an issue with Mailchimp, I resynced then cancelled the resync of our orders causing those actions to fail. Since then afew other mailchimp order sync timed out, one recently hence recent “failed” showing, this can be ignored.

    Also note we are hosted on Amazon AWS 8XL in London – 32 Cores 128GB RAM and running server side CRON.

    please see pastebin for the report https://pastebin.com/mJfiCgs4

    Thanks
    Ray





    Saif

    (@babylon1999)

    You say that you can also see this ajax warning in Query Monitor so that is good, as it is spread wider than just me.

    I’m so sorry, I meant I “can’t” see the warning in Query Monitor on my test site.

    Your system status report looks healthy apart from the cart, checkout and shop pages not being handled by WooCommerce.

    AJAX warning is an annoyance when updating products or posting new products which I do almost daily.

    I want to make sure we’re on the same page here, are you seeing the warning on the front end?

    If so, then please make sure debug is turned off as described in this guide. If you still see the error after doing so and can reproduce it on a clean installation of WooCommerce then please let us know or create a report directly in the extension’s GitHub repository: https://github.com/woocommerce/facebook-for-woocommerce/issues

    Look forward to hearing back from you.

    Thread Starter raydelta

    (@raydelta)

    My cart, checkout etc is handled by Woocommerce. See Screenshot here on imgbb.com https://ibb.co/NW3kjGh

    I am not seeing the warning on the front end no. It is in Query Monitor, whilst saving a product / updating a product in the product editor.

    Saif

    (@babylon1999)

    My cart, checkout etc is handled by Woocommerce. See Screenshot here on imgbb.com https://ibb.co/NW3kjGh

    According to the system status report, all these pages are not handled by WooCommerce meaning a third-party plugin or theme is overriding their behavior.


    Link to image: https://d.pr/i/cnX0d1

    If you’d like to figure out what is causing this, you can perform a full conflict test by disabling all plugins and switching the Storefront theme. Then enable plugins one by one to find the culprit.

    I am not seeing the warning on the front end no. It is in Query Monitor, whilst saving a product / updating a product in the product editor.

    I can’t find any warnings when updating or publishing products, or when switching PHP versions. As mentioned earlier, you don’t need to worry about this unless you notice any unusual behaviour. In this case, please inform us and we will be more than happy to investigate further.

    Cheers!

    Thread Starter raydelta

    (@raydelta)

    Latest update says “Fix – PHP Warning caused by array_filter() call”

    I assume you found the issue? Its gone from my site since update.

    Saif

    (@babylon1999)

    Hello @raydelta,

    I assume you found the issue? Its gone from my site since update.

    Glad to hear you no longer see the error. :?)

    Indeed, the developers were able to replicate and solve the issue in the last update.

    Here’s the PR for context: https://github.com/woocommerce/facebook-for-woocommerce/pull/2556

    I’ll be marking the thread as solved, please feel free to open a new one if you have any other questions.

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Ajax error when updating products showing in Query Monitor’ is closed to new replies.