Problem/Motivation
Language module alters configuration during module installation (code>language_modules_installed()). Language module shouldn't touch existing config if the modules are installed during config sync.
Proposed resolution
If we are syncing config, we need to assume the config is right and don't perform any "purging".
Remaining tasks
Patch with tests.
Test should install a profile with language types configuration (negotiation), and verify it's not altered.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|
Issue fork drupal-2613222
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedComment #4
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedComment #5
alexpottThis makes sense.
Comment #6
plachPer #5
Comment #13
alexpottAnother variant of this has been surfaced by #3061489: Umami changes the admin interface language based on the current page - we also have the same problem if the profile overrides the language.types configuration.
Comment #14
shaalThank you, applying this patch resolved that other Umami patch!
Screenshot:
Comment #19
penyaskitoI'm working on this during DrupalCon Prague sprints.
Only-test patch. I would expect this one to fail, but somehow is passing. I need to understand better how the language types purging works for triggering the error.
Comment #20
pooja saraah CreditAttribution: pooja saraah at Material for Drupal India Association commentedFixed failed commands on #19
Attached patch against Drupal 9.5.x
Comment #21
penyaskitoTagging this with DrupalCon Prague sprints tag.
Comment #22
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedThe issue is related to the installer, not config import directly. Here is a failing test.
Comment #23
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedPatch with test and the fix.
Comment #24
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedFixed CS.
Comment #26
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedThe namespace is wrong.
Comment #28
webflo CreditAttribution: webflo at UEBERBIT GmbH commented#26 was a test-only patch. Now everything together ...
Comment #29
penyaskitoUpdated issue summary
Comment #30
penyaskitoWe need a better name for this test.
This phpdoc comment need to be adjusted, I copypasted from a different test, my bad.
We might want to rename the test method too.
Otherwise this is RTBC :-)
Comment #32
Janvi Dasani CreditAttribution: Janvi Dasani commentedAdded patch #28 in 10.1.x
Comment #33
ameymudras CreditAttribution: ameymudras at Salsa Digital commentedTrying to address #30
Comment #34
penyaskitoThat looks good to me, thanks for rerolling and fixing #30.
Comment #35
alexpotthook_modules_installed() has a second parameter of
function hook_modules_installed($modules, $is_syncing) {
I'm also not sure about the check for during the installer - why are we adding that here? I see that is from Webflo's test. Need to think about this some more. I think this tricky because that is the profile replacing config functionality. I'm not sure what's correct here.
So this should be
Comment #36
alexpottDiscussed with @penyaskito. We need to check if the profile is shipping its own version and we're during installation. That will allow us to fix the umami bug.
Comment #37
_utsavsharma CreditAttribution: _utsavsharma at OpenSense Labs for DrupalFit commentedAddressed the point from #35.
Please review.
Comment #39
alexpottHere's what I mean by #36...
Comment #40
penyaskitoYou beat me before I found time to tackle this, thanks Alex!
I've tested #3061489: Umami changes the admin interface language based on the current page now with this patch and it works as expected. Do you think we need anything else for closing this one and de-postpone the other one?
Thanks again!
Comment #41
alexpott@penyaskito I don't think so. We just need reviews and a rtbc here.
Comment #42
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis 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.
Reviewing patch #39
Running the test locally just to make sure they fail.
Rest looks good using is_syncing
Comment #46
alexpottComment #47
alexpottHiding all the files
Comment #48
smustgrave CreditAttribution: smustgrave at Mobomo commentedReran tests locally because I can't run the test-only feature even after getting push access and still get a failure.
Previously RTBC so restoring status.
Comment #49
quietone CreditAttribution: quietone at PreviousNext commentedI'm triaging RTBC issues. I read the IS and the comments. I didn't find any unanswered questions or other work to do.
Leaving at RTBC.
Comment #53
catchCommitted/pushed to 11.x, cherry-picked to 10.3.x and 10.2.x, thanks!