OPEN-DSI / ecommerceng_woosync

WooSync, synchronize Woocommerce and Dolibarr
GNU General Public License v3.0
67 stars 42 forks source link

Woosync order sync error 500 #107

Open corent1lb opened 9 months ago

corent1lb commented 9 months ago

Hi there, Have an error 500 each time i'm trying to sync the order. The php log show that : `[19-Oct-2023 05:08:02 Europe/Paris] PHP Fatal error: Uncaught Error: Call to a member function liste_contact() on null in /srv/data/web/vhosts/XXXXXXX.fr/htdocs/custom/ecommerceng/class/business/eCommerceSynchro.class.php:7034 Stack trace:

0 /srv/data/web/vhosts/XXXXXXX.fr/htdocs/custom/ecommerceng/class/business/eCommerceSynchro.class.php(6692): eCommerceSynchro->addUpdateContact()

1 /srv/data/web/vhosts/XXXXXXX.fr/htdocs/custom/ecommerceng/class/business/eCommerceSynchro.class.php(4938): eCommerceSynchro->addContacts()

2 /srv/data/web/vhosts/XXXXXXX.fr/htdocs/custom/ecommerceng/class/business/eCommerceSynchro.class.php(4598): eCommerceSynchro->synchronizeInvoiceFromOrder()

3 /srv/data/web/vhosts/XXXXXXX.fr/htdocs/custom/ecommerceng/class/business/eCommerceSynchro.class.php(4028): eCommerceSynchro->synchronizeOrder()

4 /srv/data/web/vhosts/XXXXXXX.fr/htdocs/custom/ecommerceng/class/business/eCommerceSynchro.class.php(1356): eCommerceSynchro->synchronizeOrders()

5 /srv/data/web/vhosts/XXXXXXX.fr/htdocs/custom/ecommerceng/site.php(167): eCommerceSynchro->synchCommande()

6 {main}

thrown in /srv/data/web/vhosts/XXXXXXX.fr/htdocs/custom/ecommerceng/class/business/eCommerceSynchro.class.php on line 7034`

Do you have an idea ? Thanks

corent1lb commented 9 months ago

apparently woosync does not like when there is a contact merged with a pre-existing dolibarr contact

benvia commented 8 months ago

I've a similar error. Did you find a solution ?

Dolibarr 16.0.5 WooSync 4.1.65

PHP Fatal error: Uncaught Error: Call to a member function liste_contact() on null in /var/www/html/htdocs/custom/ecommerceng/class/business/eCommerceSynchro.class.php:7034 nStack trace:

0 ecommerceng/class/business/eCommerceSynchro.class.php(6692): eCommerceSynchro->addUpdateContact()

1 ecommerceng/class/business/eCommerceSynchro.class.php(4341): eCommerceSynchro->addContacts()

2 ecommerceng/class/business/eCommerceSynchro.class.php(2585): eCommerceSynchro->synchronizeOrder()

3 ecommerceng/class/business/eCommercePendingWebHook.class.php(527): eCommerceSynchro->synchronizeOrderFromData()

4 ecommerceng/class/business/eCommercePendingWebHook.class.php(592): eCommercePendingWebHook->synchronize()

5 /var/www/html/htdocs/cron/class/cronjob.class.php(1214): eCommercePendingWebHook->cronProcessPendingWebHooks()

6 /var/www/html/htdocs/cron/list.ph...', referer: https://XXXXXX/cron/list.php?id=12&action=execute&securitykey=XXXXXXX&sortfield=t.status,t.priority&sortorder=DESC,ASC&contextpage=cronjoblist

corent1lb commented 8 months ago

Yes, for me the problem come from the fact I merged the contact in Dolibarr to the new created by woocoommerce, and so Woosync dosen't like it

benvia commented 8 months ago

Thank you.

So I've tested with 4.1.65, 4.1.63 and 4.1.61 same issue.

I'm trying to going back to 4.1.59

corent1lb commented 8 months ago

I recreate totaly all my woocommerce customer in my dolibarr and then it works