fix(installer): re-enable version-incompatible apps after appstore update - #60591
fix(installer): re-enable version-incompatible apps after appstore update#60591miaulalala wants to merge 1 commit into
Conversation
2503f7a to
ce489a2
Compare
ce489a2 to
3819f43
Compare
3819f43 to
29fbe63
Compare
There was a problem hiding this comment.
successfully tested. With this branch I am able to active i.e. the files_mindmap app from v33 max to a new version up to v35 version range on a v35 server with having dropped in the v33 max version first.
{"reqId":"IEqIbEHPliZh4De0HshB","level":0,"time":"2026-08-10T11:16:10+00:00","remoteAddr":"192.168.21.3","user":"admin","app":"updater","method":"POST","url":"/ocs/v2.php/apps/appstore/api/v1/apps/update","scriptName":"/ocs/v2.php","message":"App files_mindmap is disabled; incompatible with NC 35.0.0.1: yes","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:153.0) Gecko/20100101 Firefox/153.0","version":"35.0.0.1","data":{"app":"updater"}}
{"reqId":"IEqIbEHPliZh4De0HshB","level":1,"time":"2026-08-10T11:16:12+00:00","remoteAddr":"192.168.21.3","user":"admin","app":"updater","method":"POST","url":"/ocs/v2.php/apps/appstore/api/v1/apps/update","scriptName":"/ocs/v2.php","message":"Re-enabling files_mindmap after update: it was disabled due to version incompatibility","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:153.0) Gecko/20100101 Firefox/153.0","version":"35.0.0.1","data":{"app":"updater"}}
|
/backport to stable34 |
|
/backport to stable33 |
|
/backport to stable32 |
8081af9 to
5b91ccf
Compare
…pdate When a Nextcloud server is upgraded to a new major version, apps incompatible with the old version range are automatically disabled. Previously, updating such an app via the web UI (or occ app:update) would download and upgrade the app files but leave the app disabled, requiring a manual re-enable or reinstall. updateAppstoreApp() now checks whether the app was disabled due to version incompatibility before downloading the update. After a successful upgradeApp(), if those conditions were true, enableApp() is called automatically. Also adds debug logging to previously-silent return paths in isUpdateAvailable() (git-installed apps, no newer version found, app not in store), making update failures diagnosable from debug logs. Signed-off-by: Anna Larch <anna@nextcloud.com> Assisted-by: ClaudeCode:claude-opus-5
5b91ccf to
51208d3
Compare
Summary
occ app:updatewould upgrade the files but leave the app disabled, requiring a manual re-enable or reinstall.updateAppstoreApp()now checks whether the app was disabled due to version incompatibility before downloading the update. After a successfulupgradeApp(), if those conditions were true,enableApp()is called automatically.return falsepaths inisUpdateAvailable()(git-installed app, no newer version, app not in store) — this was causing update failures to appear as "keine Hinweise" (no hints) in debug logs.Context
Reported in nextcloud/files_mindmap#269 — users upgrading from NC 31 to NC 32+ had
files_mindmapauto-disabled during the server upgrade (old version declaredmax-version="31"). Clicking "Update" in the web UI downloaded the new compatible release but did not re-enable the app, so it remained invisible/broken until manually re-enabled.cc @AndyScherzinger
Test plan
tests/lib/InstallerTest.phpcover the four cases: re-enable on incompatible-disabled, no re-enable on compatible-disabled (manually disabled), no re-enable on already-enabled, no re-enable when upgrade itself failsmax-versionbelow current NC, trigger server upgrade to auto-disable it, then update via web UI and confirm the app is re-enabledisUpdateAvailable()returns false🤖 Generated with Claude Code