Suggested commit message
Issue #2301317 by pwolanin, dawehner, Wim Leers, effulgentsia, YesCT, xjm, alexpott: MenuLinkNG part4: Conversion.
Problem/Motivation
see: #2256521: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module
Next chunk after #2301313: MenuLinkNG part3 (no conversions): MenuLinkContent UI.
Proposed resolution
Parts 1, 2 and 3 added the new code. This part 4 converts core to use it, and converts tests (that were not new tests added in previous parts.) Part 5 #2301319: MenuLinkNG part5: Remove dead code; and party! will remove the code from the old menu links that is not needed anymore and could be a quick commit after this one.
Replace almost entirely the system in HEAD with a new one with minimal user-facing changes but substantial new features under the hood and current and future performance gains (enables render caching).
Overview of the conversion (which includes *using* the new bits from previous parts):
- Define an extensible framework for different types of links, with a plugin type as a common facade
- The developer-facing APi is a plugin manager that also handles building trees into render arrays and access checks. The tree storage is a separate service that hides the implementation details of efficient hierarchy handing. tree and tree storage handle menu cacheing.
- (part 4) adds a new service: menu.rebuild_subscriber MenuRouterRebuildSubscriber
- Manage links defined in YAML and links defined by views
- Full l10n support for localizing the D8 admin interface
- i18n support via config translation for translating the links provided by Views.
- A NG content entity whose base table stores the plugin definition
- The custom menu link entity is defined as being fieldable
- Link title is the (translatable) entity label
- Menu link content entity can be added/edited via the node form (substituting for existing functionality)
Remaining tasks
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Update the issue summary | No | Instructions | done |
File followup issues for @todo | Novice | Instructions | done |
Draft a change record for the API changes | Instructions | done | |
Mark existing change records that must be updated | Novice | done | |
Manually test the patch | Novice | Instructions | |
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards | No | Instructions | effulgentsia reviewed |
Profile, identify regressions, and file followups for optimizations | Instructions | Done in #7, #16, #27, #28 |
User interface changes
Minimal, and previously reviewed and documented in part 3: module-defined menu links will have static title, description, and path that are not editable via the UI.
see #2301313: MenuLinkNG part3 (no conversions): MenuLinkContent UI and #2256521: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module
API changes
Menu links converted to plugins. 3 very notable changes that are included:
- All menu links operate behind the facade of the \Drupal\Core\Menu\MenuLinkInterface. This means that multiple different implementations can operate together in the same tree. In addition, since we consider them as plugins, the details of the optimized tree storage are not exposed. The MenuTreeStorageInterface takes only a plugin definition and returns it again, while the details of the implementation (e.g. the p1-p9 columns) are not accessible or part of the API.
- The methods for loading and rendering menu link trees have been completely consolidated and made consistent in just 3 methods on the MenuLinkTreeInterface. A lot of previously crufty code that was forward-ported from 6 and 7 has been removed, aided by the decoupling of breadcrumbs form menu links
- The code for performing these steps has been broken up into multiple services, each with a clear interface so that in the cases where the behavior needs to be customized for a site or for a different tree storage (e.g. noSQL) only a limited amount of logic needs to be re-implemented to affect the change.
Change record updates
the search: https://www.drupal.org/list-changes/published/drupal?keywords_descriptio...
was done.
Only the following were found to need an update:
- Menu links have been converted to plugins See revisions
- Menu tree building is now a service See revisions
- menu got renamed to menu_ui See revisions
- menu_get_active_trail(), menu_set_active_trail(), and menu_link_get_preferred() removed See revisions
- The language of menus and menu links can now be configured from the user interface See revisions
Comment | File | Size | Author |
---|---|---|---|
#115 | menu issues.PNG | 80.67 KB | cosmicdreams |
#98 | 2301317.97.patch | 271.31 KB | alexpott |
#96 | 2301317-91.patch | 271.28 KB | effulgentsia |
Comments
Comment #1
effulgentsia CreditAttribution: effulgentsia commentedComment #2
YesCT CreditAttribution: YesCT commentedAsked for in #2301239-39: MenuLinkNG part1 (no UI or conversions): plugins (static + MenuLinkContent) + MenuLinkManager + MenuTreeStorage 3.
add specific test coverage for encodeId() in MenuLinkOverrides
Comment #3
YesCT CreditAttribution: YesCT commented#39 3, those were just added to part 1. great.
Comment #4
xjmComment #5
xjmComment #6
pwolanin CreditAttribution: pwolanin commentedHere's the full remaining patch through step 4, the patch for step 4 on top of step 3, and the incremental change since Alex's 1st patch on the issue with some fixes and method name changes from earlier parts.
Comment #7
Wim LeersIn order for this part 4 patch to be committed (which is really the one that brings it all together), #1805054-125: Cache localized, access filtered, URL resolved, and rendered menu trees needs to be answered:
That's what this comment wants to do. Since it's easy to make mistakes in profiling, I included sufficient information for anyone to reproduce this.
The very short answer is: the patch now removes menu block which it didn't do previously, plus menu tree loading/building/rendering became ~10% slower (most likely due to the added abstractions, which is necessary for #1805054: Cache localized, access filtered, URL resolved, and rendered menu trees).
… and in doing this profiling, I've uncovered a wider performance problem.
Tested with HEAD ===
50ac4700e21f401fea8cca2379e111a912173a95
.For those of you who don't want to read the full analysis, I've put the summary/conclusion and takeaways at the top — but please do read everything if you're going to comment regarding the profiling, otherwise you're not acting on the full info.
Summary/conclusion
ab
).A possible solution is lazy services — see #1973618-27: DIC: Lazy instantiation of service dependencies (ProxyManager for "proxy services").
SystemMenuBlock
is cached, in pwolanin's original patch this is also the case, but now that my patch is merged, this is no longer the case. HEAD is incorrectly caching menu blocks per role, hence e.g. entity access checks are not running at all, which yields incorrect results. So for this optimization, I enabled the same caching again.paramscache-do-not-test.patch
) is something we probably want to include as part of this path. Doing thatnavlinks_stupidity-do-not-test.patch
), we can get a better sense of what #1805054 will bring us. We also get a better sense how hard or simple it will be to make improvements that offset the regression caused by this patch.Takeaways
With 2. and 3. as part of this patch and 1. added later, the effective regression is only 3.6% (this is what step 3, optimization 3 shows us).
The context you need to understand this profiling
This issue is one of 5 parts that #2256521: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module was split into. This issue represents part 4, which performs the actual conversion — the first three patches introduced the new code, without actually using it. Those patches landed after thorough code review.
For this patch to land, code review alone isn't sufficient; it also needs to prove that it introduces at most a minimal regression.
A minimal regression is acceptable because #1805054: Cache localized, access filtered, URL resolved, and rendered menu trees promises to bring render caching of menus, which will bring significant performance improvements that would easily offset a minimal regression in this issue (see #1805054-97: Cache localized, access filtered, URL resolved, and rendered menu trees — 10 to 20% improvement of overall page load time, depending on the complexity of the page and menus).
However, to do that, I had to refactor
MenuTree
significantly. Unfortunately, pwolanin did the same in #2256521: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module. So we had to merge our work.Before we merged our patches, effulgentsia did profiling at #2256521-73: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module and found this patch to be 15% slower. However, a large part of that can be attributed to the very inefficient
LinkGenerator
. With the hack in #2289319-2: Cache getPathFromRoute() result in the {cache_menu}.tree-data cache applied, this patch was deemed to be essentially equally fast as HEAD.After I merged my patch though, effulgentsia repeated the above (so this patch + the hack of #2289319-2) at #2256521-125: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module and found a ~10% regression (without that hack, it's 25%). My goal was to identify the root cause of that ~10% regression.
Note that since effulgentsia did all benchmarking/profiling using the anonymous user, I did so as well.
Tooling :(
Let me start by saying that I think that determining if there is a performance regression by running
ab
is less than great. It's easy to get wildly varying results between different runs, even when doing 100 requests. I think it's more appropriate to compare the number of CPU instructions.There's easily a ~10% difference between different
ab
runs!Sadly, XHProf doesn't give us that information either. Because even in XHProf runs, I see quite large variance.
In short: the tooling is lacking.
Step 1: high-level benchmarking
ab -c1 -n100 http://domain/menu-bench
, PHP 5.5.11, OpCache enabled, XDebug disabled, XHProf disabled):This is a 29% regression.
NOTE: one of the runs with the patch was 182.752 ms/request, but since this is was not reproducible, I omitted that.
ab -c1 -n100 http://domain/menu-bench
, PHP 5.5.11, OpCache enabled, XDebug disabled, XHProf disabled, APCu enabled, APC class loader enabled):This is a 29% regression as well. Since it yields the same result, I'll continue testing with this environment: everything below is tested with APCu enabled and the APC class loader enabled.
Step 2: profiling a response that does not do anything menu-related
However, let's first make sure this is not because part 4 has not yet removed dead code. In other words: let's take a look at the same benchmark (100 requests, single concurrency, fastest out of 3) when we request
/system/ajax
:This is a 10% regression. In absolute numbers, it's small, but it's consistently reproducible.
While this of course does not represent the full regression we saw above, nor is it a representative test, it is indicative of a problem that lies somewhere else than menu rendering; somewhere lower. Since the
system.ajax
route does not even trigger HTML page rendering, I can't help but wonder how this is possible. Can this be attributed to the increased number of services?So I did some profiling, doing 10 runs of each (HEAD & patch) and selecting the fastest run. Looking at the profiling results, I keep seeing the class loader and DIC. So I suspect that the increase in function calls and corresponding average increase in page generation time can be attributed completely to the increase in number of services.
In other words: everything indicates that this shift in the page generation time (in the wrong direction) is primarily caused by additional I/O and secondarily by additional function calls, both of which are direct consequences of the increase in the number of services.
In any case, this is pretty much a dead end for profiling the menu link homestretch patches' impact; but it's useful to keep track of, because it does explain a small part of the regression. It explains several milliseconds.
Further investigation
I investigated further and the good news that I've now got the full explanation. The bad news is that it's probably not easy to fix.
To make matters worse,
@plugin.manager.menu.link
in turn depends on two newly added services:@menu.tree_storage
(which in turn depends on the newly added@cache.menu
) and@menu_link.static.overrides
.Together, points 2 and 3 explain the ~4ms regression that we saw in the benchmarks. If I comment them, the number of function calls with the patch drops below that of HEAD.
To solve this out-of-scope problem, I think Symfony's lazy services may be a good option — see #1973618-27: DIC: Lazy instantiation of service dependencies (ProxyManager for "proxy services").
Step 3: profiling
/menu-bench
Not having gotten useful clues from step 2, I started doing general profiling of the
/menu-bench
response. I did 10 runs of each again and selected the fastest run.Now, the difference has become more pronounced: I'm seeing a ~20% increase in function calls and a ~25% increase in page generation time. So it's indeed worse than what was reported by effulgentsia at #2256521-73: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module (15%).
This is not news though, effulgentsia already said this at #2256521-125: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module: there was a ~25% increase in page generation time in his tests as well (but, sadly, he only measured using
ab
, which as I've explained above, can result in highly varying numbers — I'm finding 29% in this report, but only because I tried to find the fastest possible run — if I didn't do that, it could just as well have been 25% or 20%).Optimization 1: effulgentsia's patch to compensate for expensive link generation
However, at #2256521-73, by applying #2289319-2: Cache getPathFromRoute() result in the {cache_menu}.tree-data cache, he gained parity, and at #2256521-125, by applying that same patch, he found a 10% regression. Let's see if I can reproduce that as well:
As you can see, I can't quite reproduce this. There's a ~10% (8.5%) increase in function calls, but there's a ~20% (19.2%) increase in page generation time — significantly more than the 10% he reported. But, again, that might be because that was measured using
ab
.(I didn't test with
ab
here because normally,ab
& XHProf results should at least be in the same ballpark, which is not the case here. So I didn't bother.)Optimization 2: menu block caching
One of the things I contributed to this patch, is that menu blocks (
SystemMenuBlock
) are no longer cached (because right now, in HEAD, it's incorrectly caching menu blocks per role, hence e.g. entity access checks are not running at all, which yields incorrect results). That correction is definitely going to contribute to that ~20% regression in page generation time. So if I manually enable caching for the Tools and Footer menu blocks and test again, I should see a sharp difference — both in profiling and in benchmarking.Best of ten runs (
ab -c1 -n100 http://domain/menu-bench
, PHP 5.5.11, OpCache enabled, XDebug disabled, XHProf disabled, APCu enabled, APC class loader enabled):So, benchmarking-wise, instead of a 29% regression, we're now looking at an ~8% (7.6%) regression. And profiling-wise it's only a 2.9% increase in function calls and 8.6% increase in wall time.
Now we can finally look at the interesting/hard part of figuring out why this is the case.
Important intermezzo
But before doing so, I'd like to call out that the extra cost that I added, to add the abstractions necessary to make #1805054: Cache localized, access filtered, URL resolved, and rendered menu trees possible, will make it so that 1) the primary and secondary menus will be cached as well (they're not blocks currently), 2) instead of HEAD's behavior, which is for menu rendering time to scale linearly with the number of menu links, we will get (amortized) constant rendering time. If I simulate this roughly (by commenting the rendering of the primary and secondary menus in
theme.inc
andcommon.inc
), then I get a benchmark result of 139.749 ms/request, which is 3% faster than HEAD.(If that 3% improvement disappoints you: remember, that 3% will only become bigger as you end up with more complex menus — I turned a 8% regression into a 3% improvement with a primary menu that only contains the "Home" menu link and a secondary menu that only contains "My account" and "Log out" links! If anything, this quite devastatingly shows how slow menu rendering is, even when none of your menu links needs entity access checks.)
Optimization 3: Building the typical menu tree parameters is no longer cached
It was deemed a premature optimization to cache the results of
MenuLinkTree::getCurrentRouteMenuTreeParameters()
(whichMenuTree::buildPageData()
does in HEAD), but it seems this might be worth it after all.Having applied the attached
paramscache-do-not-test.patch
, this is what we get…Best of ten runs (
ab -c1 -n100 http://domain/menu-bench
, PHP 5.5.11, OpCache enabled, XDebug disabled, XHProf disabled, APCu enabled, APC class loader enabled):paramscache-do-not-test.patch
: 151.198 ms/request (down from 185.465 ms/request, a 23% reduction)So, benchmarking-wise, instead of a 29% regression, we're now looking at an ~5% regression. And profiling-wise we now have a very slight decrease in the number of function calls (-9 calls), and only a 3.6% increase is left in wall time!
Observation: menu tree loading/transforming/rendering has become slightly slower
In HEAD, the inclusive wall time of
MenuTree::renderMenu()
encompasses the parameter building and loading/transform/rendering. The profiled result took 41.4 ms.With the patch and the above 3 optimization, the inclusive wall time of
MenuLinkTree::getCurrentRouteMenuTreeParameters()
plusMenuLinkTree::(load|transform|build)()
took 45.1 ms.So this became about 10% slower — quite likely due to the increased abstraction, which we did both for maintainability as well as to allow for smarter caching to be added in #1805054: Cache localized, access filtered, URL resolved, and rendered menu trees.
Since we made the overall rendering of menus 10% slower, any double rendering of menus is going to affect us twice as much.
And unfortunately, we *do* have double rendering of menus: the incredibly silly/awful hoops we have to jump through to get cache tags for the primary and secondary menus set in HEAD require us to render those menus twice. #1805054 already fixes that, but if we "fix" that in an ugly way for now, to better approximate what #1805054 will bring us, by introducing static caching in
menu_navigation_links()
to essentially statically cache the rendered primary/secondary menus (navlinks_stupidity-do-not-test.patch
), then this is what we get…Best of ten runs (
ab -c1 -n100 http://domain/menu-bench
, PHP 5.5.11, OpCache enabled, XDebug disabled, XHProf disabled, APCu enabled, APC class loader enabled):paramscache-do-not-test.patch
+navlinks_stupidity-do-not-test.patch
: 148.238 ms/request (down from 185.465 ms/request, a 25% reduction)So, benchmarking-wise, instead of a 29% regression, we're now looking at a 2.8% regression. And profiling-wise we now have decreases in both function calls (-1.2%) and wall time (-0.2%)!
Combined with the observed improvement in
section above, I think it's obvious that it will indeed be quite easy to compensate for the minor regression introduced here.Comment #8
pwolanin CreditAttribution: pwolanin commentedI'm having trouble parsing this in full, but when we have render caching we can remove the use of the @cache.menu service.
We should also figure out how to lazy fetch services like @menu_link.static.overrides this is only used on rebuild, so we don't need the instance on 99.9% of page loads, so let's give attention to #1973618: DIC: Lazy instantiation of service dependencies (ProxyManager for "proxy services") soon.
I thinnk the overall message is that we need to move forward so we can achieve render caching?
Comment #9
Wim LeersThe actionable steps are under
.But yes, we can move forward, but we must include the caching of tree parameters (see
paramscache-do-not-test.patch
for a rough version). And we could choose to re-enable caching of menu blocks to have better performance until #1805054: Cache localized, access filtered, URL resolved, and rendered menu trees lands.Comment #10
tstoecklerI have a hard time following @WimLeers' comment as I cannot find the referenced benchmark by @effulgentsia and, thus, do not know what
/menu-bench
does. Could someone help? Thanks! :-)Comment #11
Wim Leers#10: Sorry —
/menu-bench
is provided by the benchmarking module that effulgentsia provided over at #2256521-125: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module.(I wrote so much, yet still failed at making every detail clear :()
Comment #12
Wim LeersPart of the problems I found in "step 2" in my profiling above can apparently be solved by splitting
RouterRebuildSubscriber
into two parts (thanks to dawehner & catch in IRC!).Apparently, event subscribers are only instantiated if the event they're subscribing to is actually fired. But because the
onKernelTerminate
event happens on every request,RouterRebuildSubscriber
is always instantiated, plus its dependencies, which this series of patches has made more expensive by addingMenuLinkManager
(which in turn depends on another cascade of services).However,
MenuLinkManager
is only needed for theonRouterRebuild
event. So we could split that off into a separate event subscriber, which means that big cascade of services will only need to happen when it's actually necessary — et voilà, part of the performance problem would be fixed :)Comment #13
pwolanin CreditAttribution: pwolanin commentedHere's a patch with recent changes from part3 and core
Comment #15
effulgentsia CreditAttribution: effulgentsia commentedThanks, Wim, for the awesome analysis in #7.
I'll post my numbers shortly. I also found a large difference when caching SystemMenuBlock, though not as large. I don't see why it should be this issue's scope to change the caching of SystemMenuBlock. Yes, HEAD is wrong in that it doesn't take into account per-user access checks, but I think we should deal with that in a separate issue, so that we can isolate the performance impact of that from the rest of this patch. Here's the patch for reverting that change from this issue.
Comment #16
effulgentsia CreditAttribution: effulgentsia commentedOk, here's a comparison of my results (using
ab
) vs. Wim's (inclusive wall time from xhprof) for the 3 optimizations he explains in #7:As a refresher, optimization 1 is #2289319-2: Cache getPathFromRoute() result in the {cache_menu}.tree-data cache, optimization 2 is the patch in #15, and optimization 3 is the "paramscache-do-not-test.patch" in #7.
Some notes, caveats, opinions:
ab
is a poor tool due to high variance between runs. On my machine, I get very stable numbers with ab: much more stable than I get with xhprof. I have had machines in the past (e.g., my previous MBP which was a late 2010 model) where the CPU fan would kick on all the time, and cause lots of ab variance, but my current MBP (late 2013) does not have that problem./menu-bench
URL as an anonymous user on a fresh Standard profile install after enabling the "Menu Bench" module provided in #2256521-125: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module and priming caches by visiting /menu-bench as anon at least once prior to benchmarking/profiling. Remember to always do a re-install whenever applying any of the optimization patches (not all of them strictly need it, but it's safer that way).Comment #17
effulgentsia CreditAttribution: effulgentsia commentedOh, can we also add this to this issue (ahead of the full deletion in part5)? Because in HEAD, it's a required module, it actually results in a WSOD when you install the Menu Bench module, so my tests in #16 were with this also applied.
Comment #18
pwolanin CreditAttribution: pwolanin commentedsome small form fixes and file renames
Comment #19
pwolanin CreditAttribution: pwolanin commentedhere's the increment
Comment #22
pwolanin CreditAttribution: pwolanin commentedSilly testbot - had a sporadic fail on BrokenSetUpTest because it ran out of memory or something. retest passed.
Here's a patch incorporating the 2 changes from @effulgentsia, both as full patch and only part4
Comment #23
pwolanin CreditAttribution: pwolanin commentedNew set of patches will a small change to menu_ui.admin.inc that was incorrectly in part3 instead of here.
Comment #25
pwolanin CreditAttribution: pwolanin commentedre-rolled against 8.x, and moved one new class to part 3.
Comment #26
pwolanin CreditAttribution: pwolanin commentedAnd, here's the part4 patch now that part3 is committed, with some smalls cleanups since the last one from me and YesCT.
Comment #27
Wim Leersdawehner, pwolanin and I pushed a bunch more commits. Mostly clean-up, but also to apply some of the conclusions from the profiling. We:
SystemMenuBlock
MenuLinkTree::getCurrentRouteMenuTreeParameters()
RouterRebuildSubscriber
into two parts, to remove the added overhead on requests that don't even touch menus#16.2: interesting! My computer definitely is overdue for replacement; I'm waiting for my computer a lot these days.
#16.3: I agree, it's concerning that our numbers are so vastly different. A third person should do profiling to hopefully figure out what's going on. Note that I'm on PHP 5.5, with OpCache, APCu and the APC class loader. Perhaps a difference in PHP execution environment helps explain this discrepancy?
#16.4: So… are you suggesting we do profiling with different situations as well? In the profiling I did at #1805054-97: Cache localized, access filtered, URL resolved, and rendered menu trees, I compared 6 different situations, which I think might be more representative of typical Drupal sites.
#16.5: That's already fixed now :)
#16.6: (What I'm about to say is slightly off-topic, but at the same time related to this series of patches, and something we must keep in mind.) I think that — roughly speaking — it's unfair to expect Drupal 8 core to be optimized for sites that have "very dynamic menu needs". Because that implies lower cache hit ratios. It's impossible to not have lower cache hit ratios. However, if they have such needs, then it's actually quite easy to fix their performance problems: change the configuration of the optimized access checking tree manipulator of #1805054 to not only cache per role, but cache per role *and* group *and* region (or whatever the actual dimensions are by which they need to cache). They'd only need to ensure they have sufficient room for additional cache entries. And yes, the individual cache entries would each be used less often, but it would mean that again fewer access checkers need to run on each page load, since access checkers that vary by group or region (in my example) will also be cached. In essence, this is horizontal scaling, where ultimately you could end up at caching per user… which is what the most complex sites out there (like Facebook) do.
So, time for another round of profiling (superficial this time), to see where we're currently at. Again applying the out-of-scope optimization (#2289319-2: Cache getPathFromRoute() result in the {cache_menu}.tree-data cache) to get an apples-to-apples comparison. Tested with
ef4e932d716742952a72a5ef23d538f65fcdbf78
. And the same environment as in #7 (with the APC class loader).Benchmarking
Fastest out of ten times
ab -c 1 -n100
:Or… a 3.5% improvement!
Unfortunately, there's one big caveat: one run with the patch was 128 ms, another was 129, but most were 134 ms and a few even 139/140. For HEAD, it was *always* 133, 134 or 135 on average.
Together with #16.2, I suspect part of the variance is due to my computer's hardware being weak/fragile (I did these tests with only Chrome, Terminal and Finder open, plus of course my web server stack — and still such variance!).
But in any case, we're roughly "on-par" performance-wise! It could be a consistent improvement, if my computer wasn't so stupid.
Profiling
Here we can see again that HEAD improved its memory consumption significantly: from 16.6 MB to 14.1 MB. But that improvement was made somewhere else than in the menu system, hence the 5% improvement we saw in #7 has now become a 7% memory improvement. Instead of 9 function calls less, we're now at 81 function calls less, so it's a 0.1% improvement now. But sadly, we still have a 5% regression in inclusive wall time… though — again — this could be attributed to my computer being too slow/overtaxed.
Comment #28
Wim LeersI forgot to attach the corresponding XHProf runs.
Comment #29
Wim LeersNote that in #7, we saw a ~0.8 MB memory improvement. But in #27, we see a ~1 MB memory improvement. I didn't verify this, but this is probably thanks to dawehner having split up
RouterRebuildSubscriber
:)Comment #30
xjmSo, I know some work has been done on change records already, but I see no change records referenced in the sidebar of this issue or #2256521: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module. We need:
Also, can we please get a more complete summary of what is changed in this patch, etc.? There were also several points of feedback pushed onto this issue from previous ones and I don't know if they've been addressed yet or not.
Comment #31
pwolanin CreditAttribution: pwolanin commentedLinked the change record draft to ALL 7 issues we've been working on. It includes a list of past change records that needs to be updated, but is otherwise a bit of a stub still, and the real details should go in the handbook.
I don't think we postponed any earlier concerns except the performance fixes (done) and possibly only #2304363: Make MenuLinkTreeElement's properties protected, add getters, add limited setters, though I'd prefer to keep that as a follow-up
Comment #32
pwolanin CreditAttribution: pwolanin commentedComment #33
pwolanin CreditAttribution: pwolanin commentedsome doc updates needed - these are still referencing removed functions
Comment #34
xjmThanks @pwolanin, that helps a ton.
It looks like the change record draft could use a lot of work. It previously included a list of some of the change records that need to be updated... I've transferred that here:
Those should reference this issue as well, since this is the issue that actually makes the changes. I'm not sure whether the list is complete... there are a lot that we should glance at and either rule out or also add:
https://www.drupal.org/list-changes/published/drupal?keywords_descriptio...
It looks like there are still a couple unresolved/unfiled @todo in the patch (at least one is a moved line of code, but others are not). I added a contributor task for checking over those as well.
Meanwhile, starting a line-by-line review.
Comment #35
dawehnerUpdated https://www.drupal.org/node/2240003 and https://www.drupal.org/node/1914008
Comment #36
effulgentsia CreditAttribution: effulgentsia commentedHere's my review of everything excluding menu_ui, system, and views module changes. I'll do each of those in separate comments.
All of these are just nits. I couldn't find anything significant to complain about :)
Referencing the wrong class and namespace.
\Drupal::menuTree()
Difference between $tree and $menu_tree not clear from the variable names. Possibly a followup to improve local variable names?
Is there a reason for this to be a static local variable rather than a protected instance variable?
Here and elsewhere: when we make this change, do we still need 'localized_options', or should that be removed?
Why is SafeMarkup::set() added to one of these and not the others?
The change is good, but no need to remove the trailing newline.
This code is already inside a #pre_render. Why are we adding another pre_render layer rather than calling that function directly?
Let's get a followup issue filed for this and link to it from here.
Doesn't look like this patch has any CSS changes included. Does this change require any?
Comment #37
effulgentsia CreditAttribution: effulgentsia commentedFor the Views module portion:
Should "views" be capitalized?
Is this @todo still relevant? Looks like the linked issue is fixed, and views_menu_alter() no longer exists.
Provides a form to edit Views menu links.
s/change/edit/.
Also, we should add editing of description to both the functionality and then to this doc.
If the fix for this is easy, let's add it to this patch. Otherwise, let's open a followup and add a link to the @todo.
Why do we need this check? If the plugin specified to use this form, can't we assume it implements the needed interface?
How about making this $form['path']['#description'] and unsetting $form['info']?
Any reason not to add them right now to this patch? If some of them are difficult, let's open a followup.
Is there any code calling these? The implementation seems wrong to me. Since the plugin IDs are are all 'views_view:...', those if statements are never true.
PHPStorm messing with newlines and duplicating comments? Also, the param is removed from the signature, so maybe the whole doc for it should be as well?
This hook got renamed. Not sure we need an @see here at all, but if we want it, perhaps it should point to the deriver?
If we're renaming this method, perhaps we should rename it to something better, like "getMenuLinks()"?
Since we have the {@inheritdoc}, we don't need the @return.
Comment #38
effulgentsia CreditAttribution: effulgentsia commentedFor the System module portion:
s/and/the/?
This is a UX change/regression. For example, for the Block module, the Configure link now says "Block layout" instead of "Configure what block content appears in your site's sidebars and other regions.". I get the desire to decouple Configure links from menu links, but I wonder if this at least needs a followup issue to discuss further.
At least in this patch, this seems to be a very common value for $manipulators. How about a followup to discuss making that a default for the transform() function in some way?
Do we need a new test to replace this?
Do we need a new test to replace this?
Do we need a new test to replace this?
Apparently, yes to some of the above :) Let's make sure we have an issue filed for that.
Do we have sufficient test coverage for the stuff that replaced what these were testing?
While we're here, s/Alter/Alters/.
Did we remove this functionality entirely for some reason or has it moved to somewhere else?
Comment #39
dawehnerYeah!!! Thank you for the intensive review.
Pushed the changes to the usual branch.
Sure, here is one: #2309493: Improve $tree vs. $menu_tree variables
I don't see one ... probably just c&p from the old code. I fixed this.
localized_options are certainly still in use for local tasks/actions. Here is a follow up to remove it in all places, if possible: #2309499: Drop 'localized_options' in all places?
You seem to just need a SafeMarkup::set() if there are multiple elements containing HTML. You don't need one if there is just one HTML string or multiple NON-html strings. Please clarify if I am wrong here. Expanded them as a form with indentation got rendered wrong.
No idea, maybe cacheablity? wim?
There is one: #2309501: Use plugin IDs instead of titles for toolbar classes
Good question! I did a quick grep. There are several instances of ".links" selectors. Most of them are generic links, so they don't have to be changed.
I could not find any selectors which got targeted against the secondary menu or menu in general, but I could be totally wrong here.
Sure, let's do that.
Yes, this code existed because the old menu system keyed by path, so overriding existing paths was more tricky than with the routing system, which keys by route name.
Added description, yeah let's just do it here.
Given that I am not even sure whether this is a problem we should have a dedicated test coverage here. Added #2309507: Ensure that menu link content/views is not loaded localized in the menu link edit form
Well, this was just added for documentation purposes. Replaced it with documenting the property on the class.
I think it makes sense to explain the type of menu link in the exact same place. Feel free to disagree.
Done
Sadly I don't remember why this was maybe needed at some point. Let's drop it and add later, if it was really needed.
you are totally right.
I do agree that this is a UX regression, let's also use menu links, which are even easier to use tbh. Sadly we can't rely on menu links here, so we also need the route logic. One example is the configure link of the block_content module.
Sure, with #2250315: Regression: Bring back node access optimization to menu trees this list will be expanded even more. Follow up: #2309521: Provide a sane default for menu link manipulators.
To be honest I cannot imagine that this was ever a real problem but I might be wrong.
One reason these tests got dropped was that reparenting afaik this test not makes sense for content menu links.
Here is a follow up: #2309531: Add a test for re-parenting of menu links.
Comment #40
dawehnerAdded followups
Comment #41
Wim LeersWell-spotted!
The reasons for this are:
toolbar_prerender_toolbar_administration_tray()
which can be easily compared with e.g.SystemMenuBlock::build()
.#pre_render
callback already, it'll become a simple matter of setting a#cache
property next to the#pre_render
property, and *poof* — it'll be cached!No, no CSS changes are necessary.
There also still are the two bugs I reported in #2256521: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module:
data-drupal-link-systempath
attribute).You can reproduce this by going to
admin/structure/menu/manage/admin
, drag the "Structure" subtree to be at the top level, save. All is well. Now go toadmin/config/development/performance
clear caches, then go back toadmin/structure/menu/manage/admin
and … be surprised by the total absence of the "Structure" subtree… :( … and then visitadmin/structure/menu/manage/tools
, where they've magically reappeared. WTF! :DComment #42
Wim LeersThe first bug described in #41 is actually a bug in
UrlGenerator
. Rendering menu links now usesLinkGenerator
instead ofl()
, hence the regression.l()
does this:$variables['options']['attributes']['data-drupal-link-system-path'] = \Drupal::service('path.alias_manager')->getPathByAlias($path);
LinkGenerator::generateFromUrl
does this:$variables['options']['attributes']['data-drupal-link-system-path'] = $url->getInternalPath();
But when rendering the front page front page link,
$url->routeName == '<front>'
, so$url->getInternalPath()
callsUrlGenerator::getPathFromRoute()
which callsUrlGenerator::getInternalPathFromRoute()
with the "materialized route" (i.e./
, not<front>
) and then consequently fails to return<front>
.I hope the solution I went for is correct —
UrlGenerator
is rather confusing. It does fix the bug I reported.And yes, I know, ideally we'd change
data-drupal-link-systempath
to use routes & parameters rather than system paths, but that's a much bigger undertaking, hence making that vastly out of scope.Attached is the latest version of part4, with all the fixes that dawehner did (
interdiff_dawehner.txt
) to fix #36/#37/#38 and the tiny fix I did for the first bug I reported (interdiff_wim.txt
). I don't know where to begin to debug the second bug I reported — hopefully pwolanin/dawehner can fix that.Comment #44
pwolanin CreditAttribution: pwolanin commentedThe bug with the rebuild seems to be the link getting moved to the tools menu
Comment #45
xjm@effulgentsia is doing the line-by-line. :)
Comment #46
effulgentsia CreditAttribution: effulgentsia commentedStraight reroll for #2305023: Rename getCancelRoute to getCancelUrl.
Comment #47
pwolanin CreditAttribution: pwolanin commentedHaven't resolved the shortcut fail, but let's see if the bot is otherwise happy.
Comment #48
dawehner@effulgentsia
Please also push the changes into the repo.
Comment #49
effulgentsia CreditAttribution: effulgentsia commentedReview for the menu_ui changes, excluding tests. Will do a review of the tests in my next comment.
The added
foreach
doesn't appear useful.$link doesn't appear in the code below this.
Why not use the nice entity_load() wrapper?
Would 'menu_link_definition' be a clearer key name?
Although $node->menu is a preexisting condition of HEAD, can we open an issue and add an @todo here to remove that? In D8, we shouldn't be adding arbitrary non-field properties to content entities.
Preexisting condition of HEAD, but I'm confused by this comment and @todo. I think it's made slightly worse with the conversion to use the selector, because I don't think it's intending to imply that some change is needed to that selector method itself.
Do we need the "_plugin" suffix? Now that the conversions are done, wouldn't {menu_link} be unambiguously the plugin?
Move $manipulators lower so it doesn't separate the code comment above from what it refers to.
Why did we rename the form field to "enabled" if the definition key is named "hidden"?
Comment #50
pwolanin CreditAttribution: pwolanin commentedI re-created the repo branch from Alex's patch plus added my menu name fix
Here's patch + interdiff.
Comment #53
effulgentsia CreditAttribution: effulgentsia commentedAnd the menu_ui tests:
s/and item language//
Why are we verifying this by visiting the node page. Is the link not showing up on the front page for some reason?
So with the new architecture, we're losing this feature. I think that's ok, but we need to make sure that's documented somewhere (I guess in an 8->8 change record?). Also, menu_link_content module in its current form doesn't have a UI for managing bundles. Are we punting that to contrib, or plan on adding that in a core followup?
If we're keeping the new $path parameter (per above, I don't know if we need to), we should document it, and update the "View home page." comment.
Looks like this was the only place testing the /reset route via the UI. Can we add back a test that does that?
Comment #54
dawehnerYeah, no idea how this happened.
Renamed to $entity to make it useful.
Agreed and changed
Opened a follow up: #2310173: Don't add arbitrary non-field menu to $node
Should we open just another follow up?
Just wondering whether _plugin makes it easier to disinct between an ordinary menu link and a menu_link_content
Good catch!
We do want to have enabled/status at the end everywhere because it is easier to get. The node menu form got rewritten so we just did that.
On top of that the UI was always with an enabled checkbox.
Wow!
It still passes without it ... i guess this was just needed temporarily.
We decided to move this to contrib as you might want to have bundle per menu or not, depending on your usecase of fields.
Will work on that later during the weekend
Comment #55
YesCT CreditAttribution: YesCT commentedis the itemized list in the proposed resolution in the summary an overview of all the parts so far 1-4, or just the changes in part 4? which should it be?
--
saving this again since my first save was lost...
Comment #56
pwolanin CreditAttribution: pwolanin commentedTabulating responses to each of the review points from @effulgentsia at https://docs.google.com/spreadsheets/d/1EPoJkSOG8R0NmFlY7adVXaoZgPvKudSA...
Comment #57
pwolanin CreditAttribution: pwolanin commentedre: #49.7: The menu link content module creates routes with paths like: /admin/structure/menu/item/{menu_link_content}/edit
so, I guess it could be clear that {menu_link} -> MenuLinkInterface, but maybe we can discuss in a follow-up? Also, in this step we still have other routes that load {menu_link} as the old entity.
Also re: #49.9 there is already a follow-up to fix this to a status field which is referenced in the @todo in core/modules/menu_link_content/src/Entity/MenuLinkContent.php. #2305707: MenuLinkContent disabled field should be renamed to enabled and use positive logic
Also added a missing hook_help as pointed out by @tim.plunkett in IRC.
re: #53.5 dawehner is working on adding test coverage. I think all other review points have been addressed.
Comment #58
pwolanin CreditAttribution: pwolanin commentedre: #49.6 added a follow-up at https://www.drupal.org/node/2310319 and re-worked the code comment to include a link to that.
re: #53.5 this also has dawehner's added test for reset functionality.
Comment #61
pwolanin CreditAttribution: pwolanin commentedBetter fix for the active class - handles it in the LinkGenerator and restores the test. plus a bunch of follow-up links added to @todos by YesCT.
(last local commit: c6092ed7c7036e4)
Comment #62
jibranComment #63
pwolanin CreditAttribution: pwolanin commentedThere are no JS changes relative to 8.x now.
Comment #64
YesCT CreditAttribution: YesCT commentedtodo's all have issues. updated remaining tasks and summary in the summary.
Comment #65
YesCT CreditAttribution: YesCT commentedhtml.
Comment #67
effulgentsia CreditAttribution: effulgentsia commentedAll the increments and followups look good: thanks! I think this can be RTBC once tests are fixed and change records are written/reviewed. Also, minor but:
and description :)
->getDescription().
Comment #68
effulgentsia CreditAttribution: effulgentsia commentedFrom the issue summary of #1966298: Introduce menu link bundles per menus:
So I left a comment in that issue asking for comment here. I'm ok with punting that to contrib if the D8MI team is, but I'm curious to know what Gábor and others who worked on that issue think.
Comment #69
pwolanin CreditAttribution: pwolanin commentedSilly me - the ternary in LinkGenerator was wrong except on the front page. 1 line fix, should fix all those fails.
Also fixed ViewsMenuLinkForm per #67 and doc and test fixes from YesCT, and made the MenuLinkBase more clearly abstract by moving the implementations of getTitle() and getDescription() to MenuLinkDefault. That change due to trying to write up developer examples and realizing that would be a better pattern.
@effulgentsia - Gabor reviewed these changes in terms of multilingual a while back including that change. Using the menu name as the bundle makes absolutely no sense for a filedable entity - it's just not supportable. The text from that issue is basically not really relevant given the changes we are making. If you want a menu full of non-translated links you'll have lots of options to achieve that.
Comment #70
pwolanin CreditAttribution: pwolanin commentedThis change record needs to be updated still: https://www.drupal.org/node/2226481
Comment #71
tim.plunkettYou can just delete these. The class is abstract, and these methods are on the interface.
Comment #72
pwolanin CreditAttribution: pwolanin commented@tim.plunkett - we were debating that question in IRC. I think it's better to have them there to document that they need to be implemented, and we were not sure we have a clear coding standard.
Comment #73
tim.plunkettwhen to use abstract:
1) protected methods
2a) public methods on traits
2b) public methods on classes with no interface [bad!]
There is no reason to use it when its backed by an interface and its public. We don't have these anywhere I could find, no reason to introduce them here.
Comment #74
YesCT CreditAttribution: YesCT commentedI finished reading through the patch. (Did *not* read every line of every test carefully.) Fixed a bunch of nits, docs, namings, and a few typehints in the sandbox.. and addressed #71. I guess this is ready for a new patch and interdiff when @pwolanin gets a chance.
On to manual testing.
Comment #75
YesCT CreditAttribution: YesCT commented0a. These could all be addressed in (multilingual) follow-ups... (in part because for each thing that does need work, it will need a test.
0b. do not let #2188675: "Translate" local task always visible, leads to WSOD distract from this issue. To test translation, enable content translation. (with that bug, you will see translate tabs even though you should not)
1. Problem:
The translate tab/page for custom menu links is not in the admin theme. Maybe we can do something similar to #2276387: Translate routes should properly inherit admin path use from edit route here or in a follow-up.
2. Translations
2a. As expected:
plugin/discoverable menu links are translated using User interface translation (locale, po files, po overrides)
2b. As expected:
custom menu links (menu link content entities) are translated by installing the content translation module.
2c Concern:
Where can we add to the help that for Menu links (not Custom menu links), use the User interface translation?
3. (unrelated, nothing wrong, but noting) There is a language select on menus (menus are config) (when language module is installed):
4. Language of menu links...
4a. Working as expected:
There is a language default select on the content language overview for custom menu links
4b. Working as expected:
there is no language select on individual menu links until Show language selector on create and edit pages is selected on the content language settings page for custom menu links.
4c. Problem:
Creating a menu link, then showing the language selector, and then editing the menu link and selecting a specific language
[which is effectively changing the language of a custom menu link from not specified to en]
gives:
"Site-Install
Error
The website has encountered an error. Please try again later."
and does not save the language of the menu link.
Not great.
4d. [edit]
ProblemWorks as expected:Creating a menu link when there is a default language for custom menu links (for example en), works ok. Changing the language (to say af) does save that menu link as af.
5a. Working as expected
enabling configuration translation makes *menus* have a translate operation. (No need to enable translation for menus, all config is translatable once config translation module is installed).
6. Turning on content translation
6a. Problem:
unsets the language select defaults for custom menu links. :(
(for example, the show language selector got turned off)
7. Translating custom menu link has several nice things.
7a. page title like "Create English translation of Two af" just works and gives nice context.
7b. setting certain fields as not translatable (for example description), gets the (All languages) on the form.
8. Problem
editing a custom menu link and unchecking show as expanded, does not save. Reloading the edit page still has show as expanded checked.
10. Custom menu link module help (menu_link_content_help)
10a. I think we need to take out the bit about translation (because multiple languages is not (should not be) enough to translate once #2188675: "Translate" local task always visible, leads to WSOD is fixed).
10b. "it" reads a bit awkward and ambiguous.
10c. Maybe some paragraph tags to split up ideas would help.
11. Works as expected:
Reordering menu links in a menu
12. Works as expected
Moving a menu link to another menu
13. Works as expected
Reseting a (plugin/config/non-content/non-custom) menu link.
14a. Concern
if a custom menu link was created before language select was set, then later translation was enabled, the delete form is a bit odd:
14b. Works as expected
Delete form for a translation made after turning on language and translation is fine.
15. Concern
Custom menu link that is translated is not showing translated when the path of the page displayed is in that language
(in my test set up, Four af, should have been shown as the menu title on a af page)
100. I had thought that language select on nodes (or whatever) was typically last on the edit form, but that is not the case. For nodes, language select is after title and before body. For custom menu links it is after: title, path, description, and before the enable checkbox.
101. Possibly unrelated problems
101a. deleting the translation of an article get the website encountered error.
101b. editing a translation of a node gets same error.
-----
Summary.
Should try these again, with definite steps to reproduce.
Comment #76
dawehnerThank you for that late manual testing!
This is not a follow up: #2310475: Admin theme for translation tabs just works for nodes
Question: How do we do that for nodes?
Please ALWAYS show errors (configured on
admin/config/development/logging
). Sadly drupal does not do that any longer by default.I tried the same and it worked fine. I used two languages: en and fr (both content translation installed and uninstalled).
4d. does not sound like a problem, right?
This sounds like a content translation bug, doesn't it?
Note: The checkbox should be marked as disabled given that it is for "all languages". Is there an issue for content translation already
to do that?
Isn't that the same for node?
Fixed that, ... this was just a caching bug.
Comment #77
dawehner... multipost
Comment #78
pwolanin CreditAttribution: pwolanin commentednew patch with fixes from dawehner and YesCT for the issues they and tim,plunkett found, plus flags the menu link content edit route as admin which I think will resolve the issue YesCT found of it not being in the admin theme (seems to work for me locally).
Comment #79
YesCT CreditAttribution: YesCT commentedThanks for the reminder to always show errors (admin/config/development/logging). I had looked in the apache log, but forgot about that new-ish setting.
#75
1. fixed. translate tab in non-admin theme.
2c. Creating separate issue. Where to document the 3 different ways of translating menu things. Config translation for menus. User interface translation for default menu links. Content translation for Custom menu links. #2310639: Document (expose) how to enable translation for Menu Things (Menus/Configuration translation, (Plugin) menu links/User interface translation, Custom menu links/Content translation)
4c. Having trouble reproducing this one. But was able to get an error another way: Enable content translation for Custom menu links. Create a custom menu link. Add a new language. Go to the translate page for that menu link. Click add to add a translation for that new language. Error is "invalidArgumentException: Invalid translation language (fi) specified". Issue for that: #2310647: Allowed language langcode argument cached cause Error
6a. could not reproduce
8. - still a problem. Enable content translation for Custom menu links. Add a custom menu link, leave show as expanded unchecked. Save. Edit. Show as expanded is checked.
10. can be done later as part of 2310639 or a different separate issue.
14a. could not reproduce the strange delete confirmation page
15. I'll be back in a bit to verify that is fixed.
Comment #80
YesCT CreditAttribution: YesCT commented15. verify that it is fixed. custom menu links are showing the translated titles both in the navigation and in blocks in the sidebar.
For the interested, the fix was:
Comment #81
YesCT CreditAttribution: YesCT commentedI can also verify that selecting the source for the translation works the same as for nodes.
What is a bit different is the author and date. in Menu links it is in the translation collapsed field set, and in nodes it is it's own field set (on the side/in the vertical tabs)
#2310657: Properties/Fields like author and date for Custom menu links translations
Comment #82
YesCT CreditAttribution: YesCT commentedmarking manual testing as done.
Comment #83
YesCT CreditAttribution: YesCT commented8. fixed in the sandbox with
Comment #84
dawehnerFixed the expanded problem and added a TODO
Comment #86
xjmLooks like #83 could use explicit test coverage but also like it broke something else? :)
Comment #87
pwolanin CreditAttribution: pwolanin commenteddawehner and I worked through this bug - turn out the fix he made for expanded form values broke the test since all links had been getting expanded before and hence appearing on the home page unexpectedly. This is why we were checking the $path instead of home page in earlier version, but changing that from $path back to '' in response to #53 + the actual form values fix, created a test bug.
Easiest fix is to go back to marking the parent links expanded. Also fixes up some confusing code comments.
Comment #88
effulgentsia CreditAttribution: effulgentsia commentedAll the increments from #69 on look good to me, so I'm happy with the state of the code and docs in the patch, and am therefore, unassigning myself.
For the MenuLinkContent bundle per menu discussion, I opened #2311295: Introduce MenuLinkContent bundles, which we can discuss as a followup. The reason I think it's okay as a followup is that the relevance of bundles is for either fields or for translation, and in HEAD, menu links are neither fieldable nor translatable, so losing the bundles is not a regression. But, given #1966298-124: Introduce menu link bundles per menus, I think it's worth having as a core followup to keep discussing.
I'm happy with this being RTBC as soon as:
- YesCT confirms that all of her feedback from manual testing has been adequately addressed.
- xjm confirms that the change records are in a good enough state to not need to block this issue being RTBC.
- YesCT, xjm, others: what about test coverage for the various fixes from #75 and later? Are any of those things that need new coverage?
Comment #89
YesCT CreditAttribution: YesCT commentedI'm good with the feedback and manual testing results.
child issues are good to cover things
#2310475: Admin theme for translation tabs just works for nodes can add tests for the admin theme on translate link situation as it will also take out the fix stuck in here.
also added
#2311449: Add tests for menu links not expanded on front page and other pages
#2311451: Add test for menu links and custom menu links are rendered translated in both nav menu and a menu block
just to make sure.
re-editing the issue summary to re-mark manual testing task as done
so. I'm good.
next, pwolanin and I are working on the change records
Comment #90
YesCT CreditAttribution: YesCT commentedclarifying in the summary.
Comment #91
pwolanin CreditAttribution: pwolanin commentedtrivial doc fix
Comment #92
YesCT CreditAttribution: YesCT commentedchange record list added to the issue summary with link to the revisions to review. (the revisions links would need updated as further changes to them are made that this issue missed so far)
[edit] ug. sorry about the file removed from the recent files table.
Comment #93
YesCT CreditAttribution: YesCT commentednoting that a complete search was done to find all change records that need an update.
Comment #94
pwolanin CreditAttribution: pwolanin commentedsee #91 for latest patch with passing test run at https://qa.drupal.org/pifr/test/833188
cross-post seems to have confused d.o
Comment #95
YesCT CreditAttribution: YesCT commentedComment #96
effulgentsia CreditAttribution: effulgentsia commentedReuploading #91 to get pifr's green background color.
I don't know if more polish is needed on the change records, but even if yes, I think that can happen in parallel with people monitoring the RTBC queue having a chance to review the patch. Therefore, RTBC. Awesome work, everyone!
Comment #97
xjmI'm good with YesCT's followups. I'd still like to confirm that all the dangling points from previous issues have been addressed or had their own followups, but I will... follow up with that later.
Ideally alexpott would review this since he reviewed the others and had some of those previous bits of feedback... (sorry Alex).
Also adding myself to the commit message as I spent an entire day trawling through CRs (with help from dawhener, pwolanin, and effulgentsia) and I'm still not done. But okay with RTBC on the assumption that this patch takes a bit to marinate and review anyway (and because I've resigned to doing the needed changes myself).
Comment #98
alexpottOops I broke the patch... rerolled.
Comment #99
xjmNice try, bub. ;)
Comment #100
alexpott@xjm: I actually think it would be great if catch takes this one - more eyes! I still plan to have a good look at the patch. Chatted with catch already and he seems okay with this plan.
Comment #101
xjmAssuming this is just continued crossposting and not "screw you, xjm, no one values your work"... :P
Comment #102
xjmComment #103
pwolanin CreditAttribution: pwolanin commented8.0.x please
Comment #104
xjmUpdate yer bookmarks!
Comment #105
xjmHaving two change records entitled "Menu links converted to plugins..." was super confusing, so I've incorporated the old one into the new one:
https://www.drupal.org/node/2302069
We can delete the old one (https://www.drupal.org/node/1914008) after the new one is published.
Still need to document the upgrade for a couple more constants, and then improve the introduction/overview a bit.
Comment #106
catchOverall this looks great. One nit-pick, one real question. Didn't see anything else that would hold up commit, everything that looked a bit off has a @todo and issue linked.
Very minor but $variables['attributes']['class'][] = 'menu' should just work whether it's set or not without throwing a notice.
Really? Won't that be OOM on lots of sites?
Comment #107
catchOpened #2312389: Remove menu_link_content_uninstall().
Committed/pushed to 8.0.x, thanks!
Comment #109
xjmPublished https://www.drupal.org/node/2302069 and deleted the old one.
Comment #110
dsnopekHuzzah! Congrats to everyone who's been pushing this epic issue forward for so long. :-)
Comment #111
alexpottI reverted and re-committed to bring the commit credits up to date with the suggested commit message in the summary.
Comment #113
Wim LeersHurray!
Onwards to #2301319: MenuLinkNG part5: Remove dead code; and party! now, and then we'll finally be able to close #2256521: [META] New plan, Phase 2: Implement menu links as plugins, including static admin links and views, and custom links with menu_link_content entity, all managed via menu_ui module, at which point only 3 beta blockers will remain!
Comment #114
pwolanin CreditAttribution: pwolanin commentedre: #106 - we are not deleting the entities, just the plugins, but yes - uninstalling menu link content on a site with larges abounts of that entity would be slow or OOM - but are people going to do that?
Also, _menu_link_translate() is deleted in part5, so was that just showing as context?
Comment #115
cosmicdreams CreditAttribution: cosmicdreams commentedHey gang, tested HEAD on Simplytest.me in order to see if I could find the UI changes. Found a bug instead. Think it might be this patch that introduced the regresssion:
Comment #116
xjm@cosmicdreams, that looks actually like a double-escaping issue from the Twig autoescape change. In any case, please post a separate issue with steps to reproduce, as a child issue of #2297711: Fix HTML escaping due to Twig autoescape.
Comment #117
xjmTagging the child issues retroactively.
Comment #119
XanoThis caused #2322933: Module list form fatals due to incorrect route configuration.