• Resolved miracbureau

    (@mdwebbureau)


    Hi,

    We used the most recent version of your plugin together with WooCommerce 4.3.0
    We get in our error-log:
    PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/facebook-for-woocommerce/includes/fbproduct.php on line 415

    Every minute this error is visible.
    How can we fix this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hey @mdwebbureau ,

    Thank you very much for reaching out to us! I’m sorry to hear that our plugin is causing you this issue, however, I’d be happy to help further investigate this.

    I took a look at the code of our plugin and it seems that this warning may appear when our plugin tries to sync variable products to your Facebook shop. In order to further investigate this, I’d like to know if you’re using variable products in your shop. If so, could you share me with more information regarding the type of products you’re syncing, including their attributes if they’re variable products?

    Looking forward to your response.

    Best regards,
    Pit

    Thread Starter miracbureau

    (@mdwebbureau)

    Yes, we use variable products.
    You can checkout the products here: https://cityofglass.eu/en/shop/

    Please let me know.

    • This reply was modified 4 years, 7 months ago by Jan Dembowski. Reason: Short link expanded, do not use those here
    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @mdwebbureau Do not use short links in these forums, that has been abused in the past and is expanded when found. I have expanded yours.

    Hey @mdwebbureau ,

    Thank you very much for your sharing your link with me! A few days ago, our plugin was updated to the version 2.0.0. Could you let me know if you’d be interested in updating and letting me know if this helps with the PHP warning you’ve encountered?

    Also, since this is a warning, you’ve mentioned that it’s visible all the time. I haven’t been able to encounter this error in your site, so could you provide me with more information on where this error is visible and if it has impacted the sync of your products in the time being?

    Looking forward to your response to further investigate.

    Best regards,
    Pit

    Thread Starter miracbureau

    (@mdwebbureau)

    Hi Pit,

    Yes, we still see the error:
    [07-Aug-2020 08:52:58 UTC] PHP Warning: Invalid argument supplied for foreach() in /public_html/wp-content/plugins/facebook-for-woocommerce/includes/fbproduct.php on line 438

    It is like almost every minute in the error-log.
    It seems no impact on the sync of our products, but our error-log is already 8MB. It gets huge if i dont delete it on time. But the FB error make it huge everyday. So, we really need proper solution.

    So right now we already updatet, but no solution.
    There is no specific place that the errors pop-up. It is just every minute visible in the error-log. No impact on front-end.

    Hey @mdwebbureau ,

    Thank you very much for letting me know. Unfortunately, I’m not aware what could be causing this issue, so I’ll go ahead and consult with one of our engineers and reach back to you as soon as further feedback is available.

    I’m afraid that it’s possible that our team won’t be able to get back to me within the weekend, but one of my colleagues or I will make sure to reach back to you by Monday.

    Thank you very much for your patience while working on this. Is there’s anything else I can do to help you in the meantime?

    Best regards,
    Pit

    Hey @mdwebbureau ,

    Thanks for your patience while further investigating this on our end.

    My colleagues reached back to me and informed me that this warning is caused by a part of the code used in our plugin not taking into consideration a specific condition. So, even though the plugin is working as expected and the sync process isn’t interrupted, we understand that it’s logging the warning continually on your site’s logs.

    Our team has started tracking this issue to resolve it in a future update, however, in the meantime, you may need to continue deleting the logs manually or consider setting up an automatic way for them to be deleted. If you’d like to do this automatically, you can setup a cron job that removes the logs generated by our plugin. In order to proceed with that, you’ll need access to the server and also make some technical changes.

    It’s possible that cPanel offers server cron jobs that could help you with that if you’d like to further investigate. Instead, you can also reach out to your provider and request more information if this would be feasible on their end. I’m sorry for not being able to provide you with better news on this one. Thank you for bringing this to our attention, though.

    Would you please let me know if all of the above are helpful? Anything else I can help you with?

    Best regards,
    Pit

    Hey @mdwebbureau,

    It has been a long time since we heard from you, so I’m going to mark this topic as resolved.

    If you’re still experiencing issues please take a look at our documentation for more information and create a new thread if you have further questions.

    Thanks,
    Tamara ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PHP Warning: Invalid argument’ is closed to new replies.