Repository navigation
Conversation
wazum
force-pushed
the
bugfix/empty-menu-cache-tags
branch
from
November 12, 2026 07:59
16df806 to
7361279
Compare
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.
Fixes #131
Related: #115
Menu cache entries are now also tagged with
menuId_<id>of their entry points, not only with tags derived from the result. An empty menu gets at least these tags, both on thehashcache entry and on the page cache entries that render it.When an entry point (or its translation, the DataHandler hook uses the default language uid) changes,
menuId_<entryPoint>is flushed and the menu is built again.Changes
CacheHelper::get()takes optional$entryPointIdsand adds theirmenuId_*tags on cache hit and cache miss.TreeMenuCompilerpasses itsentryPoints,ListMenuCompilerpasses itspages.LanguageMenuCompileris unchanged: its result always contains the current page, so it can't end up empty because of a missing entry point.Tests
EmptyMenuCacheTest: strict second language, the translated entry page is hidden, so the menu is empty. Unhiding the translation through the DataHandler rebuilds the menu. Fails without the fix, passes with it.ListMenuProcessorTest::menuIdTagsAreAddedToPageCacheexpects the extra tags of the listed pages now.Functional tests, phpstan and CGL pass locally on TYPO3 13 and 14.
Relation to the
bugfix/menu-cache-tagsbranch (#115)This PR doesn't cover nested pages that are missing from a non-empty menu (e.g. 1 → 2 → 3 with page 3 hidden). That's #115, and the
bugfix/menu-cache-tagsbranch handles it. I applied both changes together locally and all functional tests pass, including the nested cases from that branch.The source changes merge cleanly. The only conflict is in the expected tags of
ListMenuProcessorTest::menuIdTagsAreAddedToPageCache. Keep the lists from this PR, they include the tags from that branch.