[Bug]: Error on accounts page, when manager of accounts has been deleted
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
When opening the accounts page (/settings/users) or specifically the "Disabled accounts" view (/settings/users/disabled), the following error message is shown:
An error occurred during the request. Unable to proceed.
In the network tab of the browser developer tools, the following GET request /ocs/v2.php/cloud/users/example-manager has this response:
{
"ocs": {
"meta": {
"status": "failure",
"statuscode": 404,
"message": "User does not exist"
},
"data": []
}
}
The "example-manager" account really does not exist on our Nextcloud instance.
However, it is still referenced as the manager on another account. For this reason the accounts page frontend still tries to load it (/ocs/v2.php/cloud/users/details?offset=0&limit=25&search=):
{
"ocs": {
"meta": {
"status": "ok",
"statuscode": 200,
"message": "OK"
},
"data": {
"users": {
"example-user": {
"enabled": true,
"storageLocation": "\/var\/www\/html\/data\/example-user",
"id": "example-user",
"firstLoginTimestamp": 0,
"lastLoginTimestamp": 1706374106,
"lastLogin": 1706374106000,
"backend": "Database",
"subadmin": [],
"quota": {
"free": 524288000,
"used": 0,
"total": 524288000,
"relative": 0,
"quota": 524288000
},
"manager": "example-manager",
"email": "example-user",
"additional_mail": [],
"displayname": "example-user",
"display-name": "example-user",
"phone": "",
"address": "",
"website": "",
"twitter": "",
"bluesky": "",
"fediverse": "",
"organisation": "",
"role": "",
"headline": "",
"biography": "",
"profile_enabled": "1",
"pronouns": "",
"groups": [
"example-group"
],
"language": "en",
"locale": "",
"timezone": "Europe\/Berlin",
"notify_email": null,
"backendCapabilities": {
"setDisplayName": true,
"setPassword": true
}
},
}
}
}
}
Steps to reproduce
- Assign a manger to an account
- Delete the manger account
- Open the accounts page
Expected behavior
No error message is shown.
Either by gracefully handling this or by removing the manager from the account on the backend.
Nextcloud Server version
32
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
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 by reproducing the failure at /settings/users and /settings/users/disabled, then inspect the requests to /ocs/v2.php/cloud/users/details and /ocs/v2.php/cloud/users/example-manager. Trace how an account referencing a deleted manager is handled, and verify that the accounts page loads without an error, either by gracefully handling the missing manager or removing the stale reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100