Skip to content

Cannot inline edit when there is a different mandatory column #2990

Description

@blizzz
  1. Go to a view where there is one column with a mandatory value
  2. The view already has rows (with that column filled)
  3. 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}]}'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developAccepted and waiting to be taken care ofbugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions