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:
that needs to be replaced with:
Basically, you must reverse the two parts of code.
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.