API v2 row update fails with the documented data format
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, openapi
Research direction
Start by comparing RowOCSController::updateRow() and PublicRowOCSController::updateRow() with createRow(), which the issue says already accepts the documented map format. Check openapi.json for the expected request shape and inspect RowDataInput to understand the failure. Done means both update routes accept the documented map, reject invalid input with HTTP 400, and retain support for the list form.
Written by the indexing model from the issue text.
Description
Steps to reproduce
PUT /ocs/v2.php/apps/tables/api/2/views/{v}/rows/{r} (or the public share route) with {"data": {"18": "x"}}, the columnId → value map openapi.json documents.
Expected behavior
The cell is updated, as with createRow() and API v1, which accept the map.
Actual behavior
HTTP 500, logged as "Cannot access offset of type string on string" in RowDataInput. Only the list form [{"columnId": 18, "value": "x"}] works, which is what the web UI sends.
Tables app version
main (2.4.x); also present on the Tables 2.0 pull requests
Database
MariaDB (dev instance); not database-specific unless noted
Additional info
Suggested fix: convert the map in RowOCSController::updateRow() and PublicRowOCSController::updateRow() as createRow() does, and answer 400 for anything else.
Found while reviewing #3178.
- Dominant language
- JavaScript
- Stars
- 220
- Forks
- 57
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 89
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/tables
-
0. Needs triage accessibility bug
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
1. to develop bug design skill: frontend
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nextcloud/tables#3244 · 1 comment ·
Maintainers usually reply within 1 day
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Editing a selection column via UI fails with 500 "It is forbidden to set the Uuid from external"Open0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nextcloud/tables#2856 · 5 comments · 4 reactions ·
Maintainers usually reply within 1 day
All issues in nextcloud/tables
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
agent-os ai bug good first issue help wanted
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area: documentation good first issue package: rule-data status: accepting prs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
mastra-ai/mastra#30109 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100