You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
POST /apps/text/attachments returns 500 on PostgreSQL in Collectives read-only view (empty documentId) #9591
Describe the bug
In a Collectives page, an inserted PNG image is displayed in edit mode but not in view (read-only) mode. The image placeholder shows "Request failed with status code 500".
The failing request is POST /apps/text/attachments (AttachmentController::getAttachmentList). It is sent without session data (documentId and sessionToken are empty strings, sessionId is 0). PostgreSQL rejects the empty string for a bigint column, which results in the 500 error.
To Reproduce
Steps to reproduce the behavior:
Open a page in a Collective and switch to edit mode.
Paste or insert a PNG image. It is displayed correctly.
Leave edit mode and open the page in view mode.
The image is not displayed, the request POST /apps/text/attachments returns 500.
Expected behavior
The image is displayed in view mode as well. The attachments request should not run the session lookup with empty values.
level 3, app index, POST /apps/text/attachments
An exception occurred while executing a query: SQLSTATE[22P02]:
Invalid text representation: 7 ERROR: invalid input syntax for
type bigint: ""
Query: SELECT * FROM oc_text_sessions
WHERE document_id = ? AND id = ? AND token = ?
Params: ["", 0, ""]
Call chain:
SessionMapper::find
SessionService::getSession / getValidSession
SessionMiddleware::assertDocumentSession
AttachmentController::getAttachmentList
Browser log
POST https://<server>/apps/text/attachments
Status: 500 Internal Server Error
Content-Type of response: text/html
Activity
blizzz commentedon Nov 10, 2026
Thanks for reporting! It is a duplicate of #9415 and fixed with #9443 for upcoming NC 35.0.3.