Skip to content

Remove cache_format from the manager system settings UI - #16994

Open
Ibochkarev wants to merge 1 commit into
modxcms:3.xfrom
Ibochkarev:fix/issue-15105-remove-cache-format-ui
Open

Remove cache_format from the manager system settings UI#16994
Ibochkarev wants to merge 1 commit into
modxcms:3.xfrom
Ibochkarev:fix/issue-15105-remove-cache-format-ui

Conversation

@Ibochkarev

Copy link
Copy Markdown
Collaborator

What changed and why

Changing cache_format in System Settings crashes the manager and the site. Settings are loaded from cache, so a new format cannot read files written in the old one. Maintainers agreed to remove the setting from the manager UI and document overrides via $config_options in config.inc.php instead (#15105).

This PR drops cache_format from the install transport (new sites) and removes the row on upgrade for existing installs, same pattern as cache_disabled (#14022). Runtime support through xPDO::OPT_CACHE_FORMAT / $config_options is unchanged.

How to test

  1. Fresh install from this branch: System Settings → Caching must not list cache_format.
  2. Upgrade from 3.2.x: run setup upgrade, confirm the cache_format row is gone from system_settings and from the manager grid.
  3. Optional override: set $config_options['cache_format'] in core/config/config.inc.php, clear the cache directory, confirm the site still boots.

Gate E:

  • php -l setup/includes/upgrades/common/3.3.0-remove-cache-format.php — exit 0
  • php -l setup/includes/upgrades/mysql/3.3.0-pl.php — exit 0
  • php -l _build/data/transport.core.system_settings.php — exit 0
  • Local upgrade script run removed the DB row; getOption(OPT_CACHE_FORMAT) still resolved

Related issue(s)/PR(s)

Resolves #15105

Refs #13832 (removed cache_system_settings from transport only)
Refs #14022 (cache_disabled transport + upgrade remove)

Compatibility notes

Universal for 3.3.0. Sites that relied on editing cache_format in the manager must use $config_options['cache_format'] in config.inc.php and clear the cache directory when changing the value.

Breaking change assessment

No public method signature change. The setting disappears from the manager UI and from the system_settings table after upgrade. Config-file overrides keep working. Safe for 3.3.0; not a silent behavior change for sites that never touched the setting (default stayed 0 / PHP).

Test coverage

No PHPUnit added. Setup upgrade scripts in this repo are not covered by the unit suite (same as 2.7-remove-cache-disabled.php). Verification was manual Gate E above.

Contributors

@sergant210 reported the crash and proposed removing the setting from the UI.
@opengeek confirmed config_options is the supported override path.
@Mark-H authored the earlier cache_system_settings removal (#13832).

AI tool use

Cursor drafted the upgrade scripts and PR text. I ran the Gate E checks above before opening this.

@Ibochkarev Ibochkarev added bug The issue in the code or project, which should be addressed. area-core needs-docs The issue requires adding or updating documentation after the pull request merged. labels Aug 15, 2026
Changing it in the manager crashes the site because settings are
loaded from cache. Keep overrides via config_options; drop the
setting on upgrade for existing installs.
@Ibochkarev
Ibochkarev force-pushed the fix/issue-15105-remove-cache-format-ui branch from 39950b4 to 82b0ff8 Compare August 15, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-core bug The issue in the code or project, which should be addressed. needs-docs The issue requires adding or updating documentation after the pull request merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The system setting "cache_format" must be removed.

2 participants