25.12 bug: upload, records save fails, file is still uploaded

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1231
Joined: 2019-05-21 22:42
Location: Germany
Contact:

25.12 bug: upload, records save fails, file is still uploaded

Post by onoehring » 2025-07-29 18:07

Hi,

I noticed a bug in 25.12:
I have created some checks in a table in the database where I have an upload field. If the checks fails, this means, no record can be created in the database. This works, AG shows the "red error" (if i am Super Admin).
BUT: The file is still being placed in the upload folder.

Proposed solution: If the INSERT fails, do NOT move the file from php TEMP to the upload folder.

The red error message:
Couldn't save the new record
Check constraint 'einParent' is violated.Query: INSERT INTO `tbl_dokumente` SET `id_dokumententypen`='6', `file_saved`='6796924cfdeb430a4.png', `file_description`='etestes', `upload_timestamp`='2025-07-29 20:04:13', `id_auftrag`=NULL, `id_tour`=NULL, `id_kfz`=NULL, `id_kunden`=NULLThe above info is displayed because you are currently signed in as the super admin. Other users won't see this.You could try fixing this issue from the Admin Area : Utilities menu : View/Rebuild Fields.
Olaf

Post Reply