Problem/Motivation
The installer asks the site admin for their default country. We don't do anything with this information - it was last used for date formatting which was removed in 2014 (see #2276183: Date intl support is broken, remove it) - so we should not ask it in the first place.
For now we can leave the config setting in place, that can be removed in a followup if we decide we don't need it at all.
Before

After

Steps to reproduce
N/A
Proposed resolution
Remove the "default country" dropdown from the installer.
Remove countryManager from form injection.
Remaining tasks
User interface changes
The default country is no longer requested on the install form.
API changes
N/A
Data model changes
N/A
Release notes snippet
- The default site country option was removed from the drupal site configure form that users see on first install.
- If your site relies on this setting you will need to visit the RegionForm at Configuration > Region and Language > Regional Settings.
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | 3439439-24.before.png | 100.95 KB | dww |
| #20 | InstallPageNoCountry.png | 30.02 KB | nicxvan |
Issue fork drupal-3439439
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:
- 3439439-remove-country-setting
changes, plain diff MR !7368
Comments
Comment #2
longwaveAlternatively, if we are to keep this setting, then we should make it useful - for example, it should set up date formats correctly for the country that was selected.
Comment #4
nicxvan commentedI'm curious about this after finding your comment on 1933614
I'm going to do a naive attempt for removing it from the form to see which tests fail. I'm also not sure if the Dateformatter can be done separately since it looks for this setting.
Comment #6
andypost+1 it could be moved to contrib module
Comment #7
andypostComment #8
andypostComment #9
nicxvan commentedSo tests pass with this removed.
I think this depends on 3439440
Since 3439440 uses this setting and that issue is set to remove it.
The only other place using this in core other than the mentioned issue is the regional form that you can change the setting.
Comment #10
longwaveThe date formatter reads the value but never uses it, so this can be done first if needed.
We can remove CountryManager from the form here, it's not used any more.
Comment #11
nicxvan commentedThis might be a simple question, but I can't actually remove it, I need to follow this right? https://www.drupal.org/about/core/policies/core-change-policies/drupal-d...
Comment #12
longwaveYup we should try to provide backwards compatibility in case anyone has extended the form.
Comment #13
nicxvan commentedComment #14
nicxvan commentedI'm actually not sure of the best way to handle this since the next property is a new item with a deprecation warning as well.
Current docblock
Is the right thing to do is to add usernamevalidator as a type hint option on to $country_manager
and check to see if country manager is the country manager or username?
There can be confusion because there is a new deprecation for calling without username validator from 3 days ago on username validation.
Comment #15
nicxvan commentedComment #16
nicxvan commentedI made an attempt at deprecating it.
I think this approach depends on it getting in before the next release though since the constructor just changed last week.
If this does not get in we probably need to deprecate this differently and keep the optional username validator.
Comment #17
nicxvan commentedThere was some discussion in slack between, chx, catch, berdir, and myself about whether deprecations are necessary.
The conclusion seems to be that it is more necessary for services to prevent contrib breakage, and it is attempted in most cases where possible.
Changing deprecations within a minor release is also fine as far as I can tell, so this should be good. I'll move to needs review if the tests still pass.
Comment #18
nicxvan commentedAlso @berdir pointed out that the installer is explicitly not part of BC.
Comment #19
dwwI was about to RTBC, but I noticed something fishy with the
$deprecatedPropertiesdefinition. Added an MR suggestion about it.Other than that, I think this is ready.
Thanks!
-Derek
Comment #20
nicxvan commentedI applied @dww's suggestion and also took a screenshot of the new install page.
Comment #21
nicxvan commentedI'm also going to write a change record since I assume it is needed for a change like this.
Comment #22
quietone commentedComment #23
quietone commentedThis is changing the UI so adding tag per
https://www.drupal.org/about/core/policies/core-change-policies/core-gat.... This should also have before and after screenshots that a reviewer can find from the Issue Summary.
Ideally, this should also provide the issue where the use of the date formatting was removed.
I think this should have a usability review because not only is is changing the UI it is changing the a form in the install process. I am adding the tag but correct me if I am wrong.
Comment #24
dwwcore/lib/Drupal/Core/Installer/Form/SiteConfigureForm.phpand now look proper.Ooof, x-post with @quietone. Replying to #23:
I'm not sure what a UX team review would add here. This is a totally useless setting that has no impact on core behavior. Less is more. Removing things from the installer we don't need is a good thing. There's 0% chance that a UX review would say: "nah, we should keep asking something that core completely ignores during people's very first impression of Drupal". 😅
Meanwhile, adding a before screenshot, and embedding both in the summary.
I believe this is now RTBC.
Thanks,
-Derek
Comment #25
dwwp.s. Re:
See comment #8 and related issues. Int'l date formatting was removed at #2276183: Date intl support is broken, remove it. Added that to the summary, too.
Cheers,
-Derek
Comment #26
quietone commented@dww, thanks for updating the Issue Summary! I know that can be tedious.
I now see the original issue in the Issue Summary. Thanks! Yes, I did not read this entire issue for that information, I was relying on the Issue Summary.
I read the original issue and didn't find any specific mention of the country field in the installer. The closest I found was a sentence in the related change record that support might be added back at some future date. Removing the field does not change that it could be added back. So, that resolves any concern that I had.
Thanks again.
Comment #27
nicxvan commentedI changed the deprecation notice to be more accurate so it's not confusing since it is still required.
is now:
Comment #28
nicxvan commentedFixing summary content I accidentally changed.
Comment #32
nod_Committed 68365af and pushed to 11.x. Thanks!
Comment #34
nicxvan commentedTagging for release note inclusion.
Comment #35
nicxvan commentedComment #36
pameeela commented@nicxvan could you expand on why you think this change should be called out? The setting doesn't do anything. Why would it be disruptive for it to not be set on a new install?
Comment #37
nicxvan commented@pameeela good point actually. Existing sites already have the setting. New installs of core don't need it. And for people that need it after installing they have the change record. I've untagged.
Sorry for the confusion.
Comment #38
pameeela commentedThanks for confirming.
Comment #39
alexpottI think this issue should have considered contrib. There are usages there, especially in commerce sites. Especially in commerce - including code that assumes it is set. See http://codcontrib.hank.vps-private.net/search?text=country.default&filen... - especially the default country resolver.
Comment #40
nicxvan commentedIt was considered, we opened an issue specifically in Address to discuss it beforehand and they had only added it in a couple months before so were not opposed to removing it again.
I also built a list and opened issues in project where it could be an issue: https://www.drupal.org/project/address/issues/3444987
I then also searched contrib, almost all instances were distributions that contained core committed. I then created issues for contrib and highlighted the change, almost all instances used it as a fallback so nothing should have broken.
If there was something else I should have done let me know.