- Status changed to RTBC
about 2 years ago 5:02pm 18 February 2023 - πΊπΈUnited States smustgrave
This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β as a guide.
Removing tests tag as they were added in #13
The patch appears to be doing whats in the issue summary and cache the menu link sooner.
Test coverage shows the issue.
Looks good.
- Status changed to Needs work
about 2 years ago 11:46am 21 February 2023 - π¬π§United Kingdom catch
+++ b/core/lib/Drupal/Core/Menu/MenuLinkTree.php @@ -215,6 +215,13 @@ protected function buildItems(array $tree, CacheableMetadata &$tree_access_cache + // Generally we only deal with visible links, but just in case. if (!$link->isEnabled()) { continue; @@ -235,12 +242,6 @@ protected function buildItems(array $tree, CacheableMetadata &$tree_access_cache @@ -235,12 +242,6 @@ protected function buildItems(array $tree, CacheableMetadata &$tree_access_cache $tree_access_cacheability = $tree_access_cacheability->merge(CacheableMetadata::createFromObject($data->access)); }
Why is it OK to only collect the $tree_access_cacheability from visible links, should this be moved out of the if?
If it is OK, I think we need a comment explaining why.