fix(core): lexicons and cache after install/upgrade#16920
Open
Ibochkarev wants to merge 2 commits intomodxcms:3.xfrom
Open
fix(core): lexicons and cache after install/upgrade#16920Ibochkarev wants to merge 2 commits intomodxcms:3.xfrom
Ibochkarev wants to merge 2 commits intomodxcms:3.xfrom
Conversation
…odxcms#14952) - Clear all cache partitions (incl. lexicon_topics) in upgrade.install.php and in modinstallrunnerweb::cleanup() via cacheManager->refresh() - GetList: retry getFileTopic once for core when empty, with clearCache and DEBUG log; replace inline parseArray with filterEntriesByQuery() - Cache busting: add ?v=versionToken to manager assets in header, browser, login, logout templates (comment #581288394)
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.
What does it do?
lexicon_topics) are cleared viacacheManager->refresh()inupgrade.install.php(beforereturn true) and inmodinstallrunnerweb::cleanup()afterdeleteTree, so the manager shows correct data on first load.Workspace/Lexicon/GetList, when namespace iscoreand file-based topic is empty, lexicon cache is cleared andgetFileTopic()is retried once; DEBUG log added for that path. InlineparseArray()is replaced by a private methodfilterEntriesByQuery()to avoid "Cannot redeclare" on repeated processor calls; PHP 8+ robustness added (is_string for value, (string) for key).header.tpl,browser/index.tpl,security/login.tpl,security/logout.tplnow use?v={$versionToken}(or&v=where URL already has query).versionTokenis derived fromsettings_versionand uuid, so it changes after upgrade and the browser fetches new assets.Why is it needed?
core/cachefor the admin panel to work. Comment in the issue: "The lexicon cache has to be cleared automatically during an update."How to test
settings_versionand reload manager; confirm asset URLs get newv=and browser fetches new files.Related issue(s)/PR(s)
Resolves #15465
Resolves #14952