Let's remove the default value for the site name in the standard and minimal install profiles. Currently, it defaults to the value of $_SERVER['SERVER_NAME'] which is never the value people want, and will confuse rather than help inexperienced users.
background
Years ago, I commented on issue #1297264: Make installer use server name as site name by default:
Two days ago, I was observing my sister (she's a doctor, not a geek) installing and configuring Drupal. During the whole process, there was just one point when she really did not know what to do: choosing the Site Name in the installer. (Even the block region demonstration page confused her less!) The problem was not even the lack of a help text below the field - what really confused her, was the default value. The fact that it is set to the server name (which looks a bit technical), gave her the impression that this value is not arbitrary, but that there is a 'correct' value she needed to enter (or else Drupal does not work).
I realize that observing a single person does not count as a scientific user test, but I am convinced that using the server name as default value is something we should actively discourage instead of making it a default.
proposed solution
At the Drupal Dev Days 2015 I was discussing this with Webchick and others and we concluded that this default value still does not make sense and it would be better if there is no default value at all. This default value is set in both standard.profile and minimal.profile. In standard.profile just one line needs to be removed. Looking at minimal.profile, it seems that file can be removed completely.
I do not think we need to add tests to verify that a default value is empty. However there might already be tests asserting that the site name is equal to the server name, so in that case those tests would have to be changed.
| Comment | File | Size | Author |
|---|---|---|---|
| #50 | Screen Shot 2015-05-23 at 11.34.20 PM.png | 46.65 KB | webchick |
| #46 | site-name-placeholder-my_site.png | 372.4 KB | pjbaert |
| #45 | site-name-default-2473709-45.patch | 1.57 KB | pjbaert |
| #12 | default-sitename-before.png | 49.84 KB | marcvangend |
| #10 | site-name-default-2473709-10.patch | 1.41 KB | nicoloye |
Comments
Comment #1
nicoloye commentedI check this point.
Comment #2
webchickDoing some historical digging in git blame, it looks like this was introduced in #199400: Provide a sensible default site name. The reason SERVER_NAME was chosen was because the old one was "Drupal." While it's true that we don't want "Drupal" to be the name either, I think leaving it blank is fine. Most people would want to fill something in here.
Comment #3
webchickOh, but we should test that
drush sistill works after this patch.Comment #4
marcvangendThanks, nicoloye.
If I'm not mistaken,
drush sidefaults to "Site-install" so we should be fine there. But you're right, we do need to check.Comment #5
nicoloye commentedI made the test I confirm drush si do uses "Site-install" as a default :)
Comment #6
martin mayer commentedComment #7
nicoloye commentedHere is the patch.
I didn't removed minimal.profile file though it is not used anymore for now.
Couldn't find a test implying something against server_name, should be good, most of the tests generate random values.
Comment #8
emma.mariaComment #9
marcvangendPatch looks good, thanks! But what's the reason to not remove minimal.profile? I'm marking it 'needs work' because as far as I know, there is no reason to leave it there.
Comment #10
nicoloye commentedNo, just wasn't sure of the best practice. Here is the fixed patch.
Comment #11
nicoloye commentedComment #12
marcvangendThanks. The automated test has not finished yet, but seen from the UI, the patch works perfectly. See the before & after screenshots.
Unfortunately, now that minimal.profile is gone,
drush sino longer works:Since it works in the UI, and module files are no longer required in Drupal 8, I'd guess that this is a problem in Drush. Perhaps we should contact the drush maintainers and see if they have an opinion about it.
Comment #13
webchickFascinating. #340723: Make modules and installation profiles only require .info.yml files should've made that optional.
Comment #14
marcvangendYes, I just found the change notice too: .module and .profile files are no longer required; ModuleHandler::getModuleList() now returns Extension objects. That title is pretty clear :-)
Given the fact that this does not occur in the graphical installer, I suppose there is a hard-coded yet incorrect assumption in drush somewhere.
Comment #15
marcvangendHa, it get's even weirder. I did some more testing and I noticed that
drush si, which installs the standard profile, gives the error I posted in #12. However if you install the minimal profile withdrush si minimal, it works flawlessly. Go figure.From the UI, both standard and minimal work fine.
Comment #16
nicoloye commentedI confirm your observation. I was not sure whereas this was due to my setup or drush itself but I encounter the very same errors on site-install through drush.
Comment #19
marcvangendI created an issue against Drush, drush site-install breaks if minimal.profile is not present, regarding the
drush siproblem.Comment #20
marcvangendupdate:
It looks like we're getting closer to finding the cause of the
drush siproblem. It seems to be a Drush problem indeed.As far as I'm concerned, this patch is be RTBC, but it would be nicer to wait until Drush is ready for this. Also, we could use a usability review, as emma.maria already indicated with the tag.
Comment #21
greg.1.anderson commentedI can reproduce this bug in Drush site-install without applying this patch. As mentioned in drush site-install breaks if minimal.profile is not present, if you run `drush si minimal` first, and then run `drush si`, the existence of the line `$settings['install_profile'] = 'minimal';`, which is written by Drupal, will cause si to fail if you are installing some other profile, e.g. the standard profile. The workaround is to remove the `$settings['install_profile'] = ` line before running Drush site-install.
Comment #22
marcvangendI have verified that Greg's commit to Drush solves the
drush siproblem, so that should no longer block this issue.Comment #23
yoroy commentedWordpress (used to) put "just another Wordpress site", (as the slogan, not site name) as a simple trigger to make you find out where to change and personalize it. I don't think that completely removing it helps discoverability of this setting. It's not the most important part to learn but no name at all seems too sparse. Looks weird too, with then only Druplicon taking up most of the vertical space in the blue header bar.
(removed screenshot that didn't make sense)
Why not something generic like "Site name goes here", "My great site", "Site name here" or "Name of site"?
Comment #24
yoroy commentedSorry, this happens during install of course and site name is required there, so that screenshot won't happen.
Comment #25
yoroy commentedThen I only worry about increasing the amount of work on this page. We want installation to be done as quickly as possible, so having some default value there would still be good.
Comment #26
marcvangendThanks for the UX review, Yoroy.
So far I only looked at this form from the "Can inexperienced users understand this?" angle. But you're completely right, the question "How much work is it to complete this task?" is very important too. For more experienced users, the second question is probably more important than the first.
On the other hand, choosing a site name is something you have to do anyway. I think it's more efficient to spend a couple of seconds and do it right there on the install form, than to go to
Home > Administration > Configuration > Systemlater - assuming that the user even knows where to find that form.IMO (not a UX expert, but not a newbie either) default values only make sense if that is the correct value for the majority of users. In this case, there is no way that Drupal can guess the correct value, so a default value wouldn't be helpful.
How about adding a placeholder attribute to the site name field?
Comment #27
nicoloye commentedI like the idea of a placeholder, it gives indications without imposing anything.
But then, won't the other fields looks a bit empty without the same kind of information ?
Comment #28
yoroy commentedYou're right about the nature of a default, it should apply to the majority, which is impossible to get right in this situation.
I really like the placeholder idea. Not a fan of the “awesome” word.
Comment #29
marcvangendYoroy, sorry for the choice of words, I agree. It's just too easy to use "awesome" in every sentence about Drupal :-)
Nicoloye, I would rather have a form that looks a bit empty than a form that looks cluttered. The placeholder does serve a purpose in this case (an example of the value the user is expected to enter), but that doesn't mean that every field needs one. For instance, I don't think people need an example of an email address these days.
Comment #30
nicoloye commentedYou're right. I'll reroll the patch with such a placeholder this evening. If the text as to be changed later, it's not a big deal.
Comment #31
nicoloye commentedHere is the patch to add a placeholder.
Comment #32
nicoloye commentedComment #34
marcvangendI rolled a new patch because the code was perfect, but the inline docs were not updated.
Screenshot of the form with placeholder:
Comment #35
nicoloye commentedOops, sorry for the docs !
Comment #36
webchickI get yoroy's concerns about the installer taking slightly more time, but IMO leaving this blank is actually less work than populating it with something else. Because although prepopulating it saves a second in the installer, it means users spend multiple minutes / hours stumbling around admin/config/whatever/whatever trying to figure out where they can set it to something else.
Like an e-mail address, the site name is something that truly is unique to every site and it makes sense therefore to set it on install, IMO.
Comment #37
webchickAnd if we are going to put a placeholder in, it cannot have the word "Drupal" hard-coded in it, since distributions have their own unique names. That's how we got into this situation to begin with.
It can have a call to drupal_install_profile_distribution_name(), however, which will default to "Drupal."
Comment #38
yoroy commentedCorrect about not using the word "Drupal". A placeholder on a required field still needs you to put in your own site name there. Agreed with webchick that it's better to get this set right from the start in the installer, this is not the setting we want people to have to hunt for after install, so good point. So I think we'd be good with a placeholder that doesn't use “Drupal”. “My site” should do it.
Comment #39
marcvangendThanks yoroy, let's use 'My site'. New patch attached.
Just for the record: Discussing this in IRC, we arrived at the conclusion that using the word "Drupal" would probably be allowed in this specific case, because the core .profile files are like distributions themselves, and the code will not be inherited by other distributions. That said, having "Drupal" in the placeholder is not necessary, so let's not go there.
Comment #40
marcvangendComment #41
webchickSo that looks good, with the exception that I think minimal, being minimal, should not do any nice-to-have usability stuff, so probably this change only belongs to default. Curious if others agree though.
Comment #42
marcvangend@webchick, that thought did cross my mind, but then I figured that the "Minimal" profile must have minimal configuration, but not necessarily minimal usability. You could argue though that "Minimal" should have minimal code, and therefore the placeholder (and, as a consequence, the entire minimal.profile file) doesn't belong there.
Comment #43
yoroy commentedYeah, lets exclude it from minimal.
Comment #44
marcvangendOK, so that makes a great novice task for someone in LA :-)
(If no one takes it I'll find some time myself soon.)
We need a new patch that combines:
- the removal of minimal.profile, just like the patch in #10 did;
- the change to standard.profile as proposed in the patch in #39.
Comment #45
pjbaertI combined the patch from #10 - that removes the minimal.profile file & #39 - that updates the standard.profile file.
Comment #46
pjbaertAdded a screenshot
Comment #47
vinmassaro commentedTested this patch and it correctly:
Setting to RTBC.
Comment #48
alexpottThis is a usability improvement and allowable as per the beta evaluation. Committed 2c0cfe9 and pushed to 8.0.x. Thanks!
Comment #50
webchickInstalled Drupal from the GUI tonight for the first time in awhile, and got confused about that "My site" text. Not sure exactly what to do with this feedback, so spun off a sub-issue here: #2494131: Placeholder text for site name in installer can be confusing.