v13.4 insert_record() custom code API method does not work properly

eugenio

Administrator
Staff member
In v13.4 the custom code API method insert_record does not work and failed to insert a record when no transaction is active when it was called. Whether a transaction is active depends on the context where the method is called.

Quick workaround: edit /include/classes/ddb_api.php

At some point in the code, you have:

PHP:
return $last_inserted_ID;

if ($in_transaction === false){
            complete_trans_db();
}

that needs to be replaced with:

PHP:
if ($in_transaction === false){
            complete_trans_db();
 }

return $last_inserted_ID;

Basically, you must reverse the two parts of code.
 

eugenio

Administrator
Staff member
This bug, which affected v13.4, has now been fixed and version 13.4 has just been silently updated.
 

eugenio

Administrator
Staff member
If you want to download the latest version:

1) If you originally got v13.4 via free upgrade
→ Please visit: dadabik.com/upgrade and request a new download using your serial number.

2) If you originally got v13.4 via paid order (new license or maintenance)
→ Please contact us and we will provide you with updated download instructions.
 
Top