[Bug]: `occ config:app:set` shows "Config value were not updated" when the value stays the same but the data type changes
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 running either occ config:app:set or config:system:set to update a config value's type, if the --value <val> is the same as the current value then the output will be Config value were not updated irrelevant of whether the --type was updated. This is confusing as updating the type is performed correctly, the output message just does not state that this happened. Instead it says that nothing was updated which is factually wrong.
Steps to reproduce
- Set an occ config value to
--value 999 --type string - Set the same config value but with a different type (and enter "yes" when asked):
--value 999 --type integer - Notice that the output message states that no updates were made despite the type being successfully updated
Expected behavior
The output message should display "Config value type was updated" if only the type was requested to be changed, and the value is the same.
Nextcloud Server version
32
Operating system
Other
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
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
No errors have been found.
Nextcloud Logs
Additional info
Running Nextcloud AIO on a Fedora 44 VM inside a proxmox host with no other containers running inside the Fedora VM.
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 from the occ config:app:set and config:system:set command entry points and trace how value and type changes are reported. Reproduce the string-to-integer case from the issue, then update the message behavior and add or adjust coverage so that changing only the type reports that the config value type was updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100