SplashSync/Dolibarr

Trigger traits : DoliDB::commit() messes with current transactions

Closed this issue · 4 comments

Your trigger code makes a solitary call to DoliDB::commit().

DoliDB instance keeps count of the nesting of database transactions and only really begins, commits, or rolls back the outer one.

As a consequence, there are more calls to commit() or rollback() than to begin(). This prevents the outer transaction to be rolled back if there was an error somewhere else (a lower priority trigger, for example).

Hey,

I'm not specialist but I got an issue with latest Dolibarr here which seems related to problem described by @ATM-Marc :
Error, the balance begin/close of db transactions has been broken into trigger InterfaceSplash with action=PRODUCT_MODIFY before=1 after=0

This prevents all synchronizations.

Hi,

This error was fixed weeks ago, please upgrade your modules to V1.8.2

Best regards,

@xfred81 I'll update Dolistore soon. Thx