Working with tim.plunkett to understand wonky behaviors of menu links with the standard install profile.
It turns out that moduleHandler::uninstall() calls drupal_flush_all_caches(), but for module installs it's only triggered by the form submit.
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | interdiff.txt | 775 bytes | dawehner |
| #26 | 2181151-26.patch | 2.25 KB | dawehner |
| #24 | 2181151-24.patch | 1.5 KB | dawehner |
| #19 | interdiff.txt | 684 bytes | dawehner |
| #19 | 2181151-19.patch | 1.49 KB | dawehner |
Comments
Comment #1
botanic_spark commentedHi,
drupal_flush_all_caches() moved from ModulesListForm::submitForm() to ModuleHandler::install()
Comment #3
internetdevels commentedComment #4
botanic_spark commentedTested patch #3 and Drupal installation is finished without errors.
I missed the
part.
Comment #6
internetdevels commented3: base_system-2181151-3.patch queued for re-testing.
Comment #8
tim.plunkettI think this is the correct approach. It loads stuff like path.inc the same way as in _drupal_bootstrap_code().
Comment #10
tim.plunkettBorrowing from _menu_navigation_links_rebuild, which checks for menu_link first.
Comment #12
travolo commented3: base_system-2181151-3.patch queued for re-testing.
Comment #14
botanic_spark commentedIs this issue still relevant?
It seams that the core is changed a lot since this issue was active.
ModuleHandler::install() method does not longer exist, and ModulesListForm::submitForm() doesn't contain drupal_flush_all_caches() anymore.
Comment #15
alexpottYep we're working to actively avoid flushing caches during module install. Re-titling the issue to focus on what we should be looking to do.
Comment #16
dawehnerLet's simply give it a different try.
Comment #19
dawehnerLet's see.
Comment #20
pwolanin commentedSeems a little funny that we have to force it during the profile install?
Patch seems ok, though comment needs to be reformatted and reworded a bit.
Comment #21
dawehnerEhem absolutely right!
Comment #22
berdirNeeds work for that...
Comment #23
dawehnerComment #24
dawehnerMaybe something like this?
Comment #26
dawehnerThere we go.
Comment #27
berdirWondering if the added line in standard_install() could be considered an API change for install profiles, what happens exactly if you don't have that?
Also could be argued that we're possibly breaking contrib tests too although highly unlikely, and afaik we want to avoid that for 8.0.x as much as possible.
So, setting to RTBC for 8.1.x to get feedback on whether we are allowed to do this.
Comment #28
dawehnerIs that statement actually true? I always thought that we don't support our tests as any form of API.
Comment #29
catchWe don't support tests as any kind of API, but also we'd try to avoid breaking tests in patch releases so that people don't have to update their tests every month. I just committed #1494670: References to CSS, JS, and similar files should be root-relative URLs: avoids mixed content warnings & fewer bytes to send which breaks contrib tests, but in that case the tests were specifically checking for the buggy behaviour we were fixing.
Patch looks fine for 8.1.x though.
Do you know why we're flushing all caches in uninstall but not in install? I'm wondering if we need a follow-up to add that in.
Comment #30
dawehnerI don't see the difference. Both install and uninstall calls out to
\Drupal::service('router.builder')->setRebuildNeeded();Just the menu_ui module (which was some behaviour inherited from some of the renames over time) directly rebuilt it.
Comment #32
catchOK got it. Committed/pushed to 8.1.x.
Since there's theoretical breakage, not moving back to 8.0.x, but if this is actually affecting a site somehow please re-open.
Comment #33
dawehnerFor sites, the router is rebuild at the end of the request / installer (in theory), so if there is breakage than in tests. But yeah I don't care about 8.0.x here.