SENAITE LIMS - Silent Failure on Programmatic Form Submission (Even with Admin User)

Hi everyone,

I’m hoping for some expert guidance on a very stubborn “silent failure” issue while integrating a Django application with SENAITE LIMS. We have exhausted all client-side debugging and believe the issue is on the server.

The Goal: I have a Django web app that automates soil mechanics calculations. The final step is to programmatically send these results to an Analysis Request in SENAITE and change its workflow state.

The Problem: My Django application sends the results to SENAITE’s standard web form handlers. The SENAITE server responds with a 200 OK success code. However, the data is never saved, and the workflow state does not change. This silent failure occurs even when authenticating as the admin/Manager user, and there are no corresponding errors in the SENAITE log files (event.log or docker logs).

What We’ve Tried (The Long Journey):

  1. JSON API Failure: We initially tried using the senaite.jsonapi add-on but found its /update and /search endpoints to be unreliable in our environment, leading to the original silent failures.

  2. “Browser Simulation” Workaround: We developed a method to simulate a real user. The code programmatically logs in to get a session cookie and an _authenticator token, and then makes POST requests to the same URLs the browser uses (e.g., .../set_fields to save results and .../transitions to change the workflow state).

  3. Hybrid Authentication: We created a final client that uses two authentication methods: simple Basic Auth for reading data (which works perfectly) and the full session-based login for the browser simulation.

  4. The Final Test (Using Admin User): To eliminate any possibility of a permissions issue, we ran the entire process using the credentials of the admin/Manager user. The silent failure still occurs.
    Our Core Questions for the Community:

    1. Why would a programmatic POST request, authenticated with a Manager’s session, result in a 200 OK but a silent failure to save data?

    2. Is there a known issue in SENAITE LIMS where requests from a Python library like requests are treated differently than those from a real browser, even if headers and payload seem identical?

    3. What is the best way to debug this on the server side when the Zope logs are silent? Could this be a transaction veto or a database issue (e.g., read-only) that doesn’t produce an error?

    Any insight or suggestions for server-side debugging would be incredibly helpful.

    Thank you!

1 Like