Consistently show PHP warning in my log file as follow. What is wrong?
PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /wp-content/plugins/facebook-for-woocommerce/includes/fbproduct.php on line 50
Hi @HW-Siew ,
Can you follow the support section on the front page of this repository and give us useful information in order to help you?
eg. your store url, or fb page, version
If you just told me this , I have no idea which version you are using, or what could be the cause.
Thank you.
I'm seeing the same issue. Plugin version 1.8.2. Woocommerce v3.3.4 and WP 4.9.4. PHP 7.2.2, nginx/1.12.2
Actually we have seen this error notice also with earlier versions of the plugin. And also before jumping from PHP 7.0 to the current one.
Hi @HW-Siew ,
Besides that, did you find related stack trace ? Caller?
Thanks.
Same problem:
call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
Type: PHP Warning Line: 50
File: /home/wp-content/plugins/facebook-for-woocommerce/includes/fbproduct.php
And also:
Trying to get property of non-object
Type: PHP Notice Line: 662
File: home/wp-content/plugins/facebook-for-woocommerce/facebook-commerce.php
Thanks for any suggestion
My configuration:
Plugin version 1.8.2. Woocommerce v3.3.4 and WP 4.9.4. PHP 7.2.2
Hi @marc-one ,
When did you see the second php warning? like you change the visibility of a certain product? Or when you sync all products?
Thanks.
Hi
Just after update some product
Thanks a lot
Il giorno 02 apr 2018, alle ore 16:34, mengyingdu notifications@github.com ha scritto:
Hi @marc-one https://github.com/marc-one ,
When did you see the second php warning? like you change the visibility of a certain product? Or when you sync all products?
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/facebookincubator/facebook-for-woocommerce/issues/348#issuecomment-377942758, or mute the thread https://github.com/notifications/unsubscribe-auth/AkN2Dk-42UEuREv4_XhXJOyGYbJPuhHBks5tkjcMgaJpZM4S8F6W.
Hi @HW-Siew ,
When did you see this error? initial sync all products? or change any product info?
Can you upload a screenshot of this error log (more context above and after)?
Thanks.
So I trade to update one product and insert new one but nothing happen ! Should I synchronize all product?
Il giorno 02 apr 2018, alle ore 16:47, mengyingdu notifications@github.com ha scritto:
Hi @HW-Siew https://github.com/HW-Siew ,
When did you see this error? initial sync all products? or change any product info?
Can you upload a screenshot of this error log (more context above and after)?Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/facebookincubator/facebook-for-woocommerce/issues/348#issuecomment-377945636, or mute the thread https://github.com/notifications/unsubscribe-auth/AkN2DovIzHk0tjZ5HylMIpobMIY5lQZnks5tkjn-gaJpZM4S8F6W.
So I trade to force sync and nothing happen any more I mean:
First message:
Starting background sync to Facebook: 139 products…
Than :
Pushing post to queue: 19721 and a lot more
Than:
Nothing to update for product group for 1643288649070445 and a lot more
And only one message :
{"headers":{},"body":"{"success":true}","response":{"code":200,"message":"OK"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}}
Total message 176
It same all is working fine ?
Thanks a lot
Inizio messaggio inoltrato:
Da: Marco Chitti mvchitti@gmail.com
Oggetto: Re: [facebookincubator/facebook-for-woocommerce] PHP Warning ! (#348)
Data: 2 aprile 2018 17:22:11 CEST
A: facebookincubator/facebook-for-woocommerce reply@reply.github.comSo I trade to update one product and insert new one but nothing happen ! Should I synchronize all product?
Il giorno 02 apr 2018, alle ore 16:47, mengyingdu <[email protected] notifications@github.com> ha scritto:
Hi @HW-Siew https://github.com/HW-Siew ,
When did you see this error? initial sync all products? or change any product info?
Can you upload a screenshot of this error log (more context above and after)?Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/facebookincubator/facebook-for-woocommerce/issues/348#issuecomment-377945636, or mute the thread https://github.com/notifications/unsubscribe-auth/AkN2DovIzHk0tjZ5HylMIpobMIY5lQZnks5tkjn-gaJpZM4S8F6W.
@mengyingdu , sorry for late reply.
FB page : https://www.facebook.com/actiweb.co/
Plugin version : 1.8.3
woocommerce : 3.3.4
wp version : 4.9.5
php : 7.1
I am not really sure when this is happening. it shows multiple entries in my system log every day.
What other information can help, pls let me know.
Thanks
Unfortunately I can't reproduce this warning, we would need a stack trace (sometimes it's in the logs near the notice) to see what the caller of that method is doing, that's where the problem lies.
If anyone has a stack trace, please post it here. In the meantime, we will fix where we think the warning is coming from and include that in the next version. That may address the issue.
The problem is here, and it looks like $this->woo_product is somehow null. So I'm guessing we incorrectly identified some wp_id as a woo product somewhere in the code.
I'll install the update today @dmitridr and will let you know if this fixes the issue.
Thanks @ttjs82 even if it doesn't fix the issue, we added logging to send us a stack trace if the warning occurs, so we should be able to track down the problem. Will check the logs tomorrow.
I forgot to report that the update did fix the issue for us at least. We haven't seen the error since v.1.8.5 update. Thanks @dmitridr
Thanks for confirming. I followed up and figured out what was going on here:
We were trying to delete and update the visibility of non-products, meaning normal wordpress posts. We have a fix ready which should be out in the next version (v1.8.6 / v1.9.0), though the current version (v1.8.5) suppresses the warning.
Hi @HW-Siew @ttjs82 @marc-one @iamajayyadav ,
This has been fixed in v1.8.6.
Also, we had a quality room first half of this week and just released v1.8.6 We have 10 fixes plus 1 content enhancement. I do recommend you upgrade.
If you like Facebook-for-WooCommerce  please leave us a * on WooCommerce rating. A huge thanks in advance!