Cannot inline edit when there is a different mandatory column
Open
Nobody has claimed this yet.
1. to develop
bug
- Dominant language
- JavaScript
- Stars
- 214
- Forks
- 52
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 82
Description
- Go to a view where there is one column with a mandatory value
- The view already has rows (with that column filled)
- Try to change another value inline
Expected: Save
Actual: Errors and the log line: An internal error or exception occurred: Mandatory column \"Foobar\" cannot be empty.
Stack trace
{
"reqId": "FYhtp92zAFdqhN1yIROq",
"level": 3,
"time": "2026-09-08T10:24:44+00:00",
"remoteAddr": "12.123.12.12",
"user": "dexter.holland",
"app": "tables",
"method": "PUT",
"url": "/ocs/v2.php/apps/tables/api/2/views/123/rows/456",
"scriptName": "/ocs/v2.php",
"message": "An internal error or exception occurred: Mandatory column \"Foobar\" cannot be empty.",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:154.0) Gecko/20100101 Firefox/154.0",
"version": "35.0.0.8",
"exception": {
"Exception": "OCA\\Tables\\Errors\\BadRequestError",
"Message": "Mandatory column \"Foobar\" cannot be empty.",
"Code": 0,
"Trace": [
{
"file": "/opt/nextcloud/apps/tables/lib/Service/RowService.php",
"line": 432,
"function": "validateMandatoryColumns",
"class": "OCA\\Tables\\Service\\RowService",
"type": "->"
},
{
"file": "/opt/nextcloud/apps/tables/lib/Service/RowService.php",
"line": 694,
"function": "cleanupAndValidateData",
"class": "OCA\\Tables\\Service\\RowService",
"type": "->"
},
{
"file": "/opt/nextcloud/apps/tables/lib/Controller/RowOCSController.php",
"line": 149,
"function": "updateSet",
"class": "OCA\\Tables\\Service\\RowService",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 198,
"function": "updateRow",
"class": "OCA\\Tables\\Controller\\RowOCSController",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 86,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/opt/nextcloud/lib/private/AppFramework/App.php",
"line": 138,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/opt/nextcloud/lib/private/Route/Router.php",
"line": 324,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/opt/nextcloud/ocs/v1.php",
"line": 86,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/opt/nextcloud/lib/OC.php",
"line": 1397,
"function": "{closure:/opt/nextcloud/ocs/v1.php:33}",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/opt/nextcloud/ocs/v1.php",
"line": 33,
"function": "handleRequests",
"class": "OC",
"type": "::"
},
{
"file": "/opt/nextcloud/ocs/v2.php",
"line": 10,
"args": [
"/opt/nextcloud/ocs/v1.php"
],
"function": "require_once"
}
],
"File": "/opt/nextcloud/apps/tables/lib/Service/RowService.php",
"Line": 491,
"message": "An internal error or exception occurred: Mandatory column \"Foobar\" cannot be empty.",
"exception": "{\"class\":\"OCA\\Tables\\Errors\\BadRequestError\",\"message\":\"Mandatory column \\\"Foobar\\\" cannot be empty.\",\"code\":0,\"file\":\"/opt/nextcloud/apps/tables/lib/Service/RowService.php:491\",\"trace\":\"#0 /opt/nextcloud/apps/tables/lib/Service/RowService.php(432): OCA\\Tables\\Service\\RowService->validateMandatoryColumns()\\n#1 /opt/nextcloud/apps/tables/lib/Service/RowService.php(694): OCA\\Tables\\Service\\RowService->cleanupAndValidateData()\\n#2 /opt/nextcloud/apps/tables/lib/Controller/RowOCSController.php(149): OCA\\Tables\\Service\\RowService->updateSet()\\n#3 /opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(198): OCA\\Tables\\Controller\\RowOCSController->updateRow()\\n#4 /opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(86): OC\\AppFramework\\Http\\Dispatcher->executeController()\\n#5 /opt/nextcloud/lib/private/AppFramework/App.php(138): OC\\AppFramework\\Http\\Dispatcher->dispatch()\\n#6 /opt/nextcloud/lib/private/Route/Router.php(324): OC\\AppFramework\\App::main()\\n#7 /opt/nextcloud/ocs/v1.php(86): OC\\Route\\Router->match()\\n#8 /opt/nextcloud/lib/OC.php(1397): {closure:/opt/nextcloud/ocs/v1.php:33}()\\n#9 /opt/nextcloud/ocs/v1.php(33): OC::handleRequests()\\n#10 /opt/nextcloud/ocs/v2.php(10): require_once('...')\\n#11 {main}\"}",
"CustomMessage": "An internal error or exception occurred: Mandatory column \"Foobar\" cannot be empty."
}
}
Example minimal request
curl 'https://cloud.example.org/ocs/v2.php/apps/tables/api/2/views/123/rows/456' \
-X PUT \
-H "OCS-APIRequest: true" \
-H 'Content-Type: application/json' \
--data-raw '{"data":[{"columnId":124,"value":true}]}'
Contributor 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.
Research direction
Start with apps/tables/lib/Service/RowService.php, especially validateMandatoryColumns at line 432 and cleanupAndValidateData at line 694, then trace the update through RowOCSController.php line 149. Reproduce the minimal PUT request against a view with an already-filled mandatory column. Done means changing another value inline saves without reporting the existing mandatory column as empty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100