Skip to content

Persist selected package provider in Package Management - #16984

Open
Ibochkarev wants to merge 3 commits into
modxcms:3.xfrom
Ibochkarev:fix/16446-persist-package-provider
Open

Persist selected package provider in Package Management#16984
Ibochkarev wants to merge 3 commits into
modxcms:3.xfrom
Ibochkarev:fix/16446-persist-package-provider

Conversation

@Ibochkarev

@Ibochkarev Ibochkarev commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

What changed and why

Package Management forgot which provider you picked. After a refresh it jumped back to modx.com, and the Packages toolbar never showed the active provider name. That matches the report in #16446.

This change stores the choice in the existing default_provider system setting (already read by the workspaces controller). Choosing a provider in “Save and go to Package Browser” now writes that setting through a small Workspace/Providers/SetDefault processor, then updates the in-memory provider and toolbar label. The Packages toolbar shows Provider: {name}, and the package browser breadcrumbs / home copy include the same name.

Also removed the mid-session reset in onDownloadMoreExtra and the changeGProvider / changePProvider flags in the browser tree. Those flags only delayed store updates and made provider switches harder to follow.

image image

How to test

  1. Manager → Extras → Installer.
  2. Confirm the toolbar shows Provider: … with the current default.
  3. Open Change Provider, pick another provider, save.
  4. Confirm the toolbar and package browser breadcrumbs show the new name.
  5. Reload the page. The same provider should still be selected.
  6. Click Download Extras again. The provider should not reset to modx.com.
  7. Optional: System Settings → search default_provider and confirm the value matches.

Related issue(s)/PR(s)

Resolves #16446

Compatibility notes

Universal for the manager Package Management UI. Fresh installs get default_provider from transport. Existing installs create the setting on first successful save via SetDefault (upsert). No CLI or REST API change.

Breaking change assessment

No public API signature changes. Default runtime behavior for sites that never change provider stays modx.com (id 1). Sites that select another provider now keep that choice across reloads, which is the intended fix for #16446.

Test coverage

No automated tests added. Coverage is manual UI verification against a local manager install (provider switch, persist across reload, Download Extras without reset). Processor path is a thin setting upsert with permission workspaces.

Contributors

Thanks to everyone who documented the original behavior in #16446.

AI tool use

Cursor (agent) helped implement the manager JS/PHP changes, run local verification against Valet, and draft this PR text. Human review and merge decision remain required.

Store the active provider in the default_provider system setting so the
toolbar label, browser breadcrumbs, and Download Extras flow keep the
user's choice after reload instead of resetting to modx.com.
Drop the Russian workspace/setting lexicon edits so translators
pick up the new keys from the English files.
@Ibochkarev Ibochkarev added the requires build Grunt build is required for integration label Aug 9, 2026
@Ibochkarev
Ibochkarev force-pushed the fix/16446-persist-package-provider branch from 4b05bce to 8dd8f3f Compare August 11, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires build Grunt build is required for integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Current providers in package management installer

1 participant