Bug Report: Delete action fails silently on external MariaDB data source (v20.0.46)

Dear Nocobase Team,

I am writing to report a regression bug affecting the Delete action on collections connected to an external MariaDB data source. This issue was not present in an earlier version and appears to have been introduced in or before v20.0.46.


Environment

  • Nocobase version: v20.0.46
  • Data source type: External MariaDB
  • Affected action: Delete (via UI action button)
  • User permissions tested: Admin (full permissions) — issue persists regardless of role

Behaviour Observed

When a user clicks the Delete button on a record in any block type (table block, form block, details block, etc.) bound to an external MariaDB data source:

  1. The UI displays a spinning loading indicator that never stops, and the record remains unchanged — as if the action was never triggered
  2. The Nocobase API logs confirm the request completes with HTTP 200 and returns {"data": 1}
  3. However, the record is not deleted from the underlying MariaDB database — it remains intact and reappears on page refresh

Create and Edit actions on the same collection work correctly. Only Delete is affected.


Technical Detail

Inspecting the API logs, the UI’s delete button calls the association destroy path:

POST /api/student/{id}/has_enrolment:destroy?filterByTk[ID]=5000433
→ HTTP 200, {"data": 1}   ← success reported, record not deleted

This indicates the bug is in how Nocobase’s association destroy action propagates to the external data source. The Nocobase layer reports success but does not execute the DELETE statement against the external MariaDB.

Notably, deleting the same record directly via the API works correctly:

POST /api/enrolment:destroy?filterByTk=5000433
→ HTTP 200, {"data": 1}   ← record is successfully deleted from MariaDB

This confirms the issue is specific to how the UI’s association destroy path handles external data sources, and is not a general database connectivity or permissions problem.


Steps to Reproduce

  1. Connect a MariaDB external data source in Nocobase
  2. Define a collection and a relationship (e.g. student has many enrolment via foreign key)
  3. Add a Delete action button to any block type displaying the related records
  4. Click Delete on any record — confirm with the dialog
  5. Observe: a spinning indicator appears and never resolves; the record still exists in MariaDB

Expected Behaviour

The delete action should propagate through the association and execute a DELETE statement on the external MariaDB, consistent with how Create and Edit actions work and how the direct API call behaves.

Regards,
Nat

Please provide the log file showing the time of the error, indicating the exact time.
Log file location: storage\logs\main (request_xxx, system_xxx, system_error_xxx, sql_xxx)
Online log file management address: admin/settings/logger

Hi there,
Here’s the log file you requested.
Just to give you some context on what I did:

Removed all the old logs
Restarted Nocobase
Signed in
Navigated to that record and tried to delete it
Downloaded the log files

This should be a clean log showing just that specific deletion attempt.
Let me know if you need anything else!
Cheers,
Nat

log.zip (22.6 KB)