Remove cache_format from the manager system settings UI - #15
Open
Ibochkarev wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что сделано
Изменение
cache_formatв System Settings крашит менеджер и сайт. Настройки грузятся из кэша, поэтому новый формат не может прочитать файлы, записанные старым. Мейнтейнеры согласились убрать настройку из UI менеджера и задокументировать override через$config_optionsвconfig.inc.php(modxcms#15105).Этот PR убирает
cache_formatиз transport установки (новые сайты) и удаляет строку при апгрейде для существующих установок, тот же паттерн, чтоcache_disabled(modxcms#14022). Runtime-поддержка черезxPDO::OPT_CACHE_FORMAT/$config_optionsне меняется.Как проверить
cache_format.cache_formatисчезла изsystem_settingsи из грида менеджера.$config_options['cache_format']вcore/config/config.inc.php, очистите каталог кэша, подтвердите, что сайт грузится.Gate E:
php -l setup/includes/upgrades/common/3.3.0-remove-cache-format.php— exit 0php -l setup/includes/upgrades/mysql/3.3.0-pl.php— exit 0php -l _build/data/transport.core.system_settings.php— exit 0getOption(OPT_CACHE_FORMAT)по-прежнему резолвитсяСвязанные
Refs modxcms#15105
Refs modxcms#13832 (убран
cache_system_settingsтолько из transport)Refs modxcms#14022 (
cache_disabledtransport + upgrade remove)Совместимость
Универсально для 3.3.0. Сайты, правившие
cache_formatв менеджере, должны использовать$config_options['cache_format']вconfig.inc.phpи чистить каталог кэша при смене значения.Совместимость
Без изменения сигнатур публичных методов. Настройка исчезает из UI менеджера и из таблицы
system_settingsпосле апгрейда. Config-file override продолжает работать. Безопасно для 3.3.0; не silent behavior change для сайтов, не трогавших настройку (дефолт остался 0 / PHP).Оригинал: modxcms#16994