nextcloud / nextcloud/server

[Bug]: `occ config:app:set` shows "Config value were not updated" when the value stays the same but the data type changes

Open
#60,065 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 32-feedback bug
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
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
  1. Set an occ config value to --value 999 --type string
  2. Set the same config value but with a different type (and enter "yes" when asked): --value 999 --type integer
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.