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.

Comments

nicoloye’s picture

Assigned: Unassigned » nicoloye

I check this point.

webchick’s picture

Doing 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.

webchick’s picture

Oh, but we should test that drush si still works after this patch.

marcvangend’s picture

Thanks, nicoloye.

If I'm not mistaken, drush si defaults to "Site-install" so we should be fine there. But you're right, we do need to check.

nicoloye’s picture

I made the test I confirm drush si do uses "Site-install" as a default :)

martin mayer’s picture

Assigned: nicoloye » martin mayer
nicoloye’s picture

Status: Active » Needs review
StatusFileSize
new1.41 KB

Here 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.

emma.maria’s picture

Issue tags: +Needs usability review
marcvangend’s picture

Status: Needs review » Needs work

Patch 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.

nicoloye’s picture

StatusFileSize
new1.41 KB

No, just wasn't sure of the best practice. Here is the fixed patch.

nicoloye’s picture

Status: Needs work » Needs review
marcvangend’s picture

StatusFileSize
new49.84 KB
new49.15 KB

Thanks. 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 si no longer works:

$ drush si
You are about to DROP all tables in your 'drupaltest' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the --notify global option.                         [ok]
exception 'Drupal\Core\Installer\Exception\InstallerException' with message 'Required modules: Required modules not  [error]
found.

The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as
<em>/modules</em>. Missing modules: <span class="admin-missing">Minimal</span>' in
/home/marc/http/public/drupal/core/includes/install.core.inc:2268
Stack trace:
#0 /home/marc/http/public/drupal/core/includes/install.core.inc(1010): install_display_requirements(Array, Array)
#1 /home/marc/http/public/drupal/core/includes/install.core.inc(644): install_verify_requirements(Array)
#2 /home/marc/http/public/drupal/core/includes/install.core.inc(522): install_run_task(Array, Array)
#3 /home/marc/http/public/drupal/core/includes/install.core.inc(117): install_run_tasks(Array)
#4 /home/marc/.composer/vendor/drush/drush/includes/drush.inc(709):
install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#5 /home/marc/.composer/vendor/drush/drush/includes/drush.inc(694): drush_call_user_func_array('install_drupal',
Array)
#6 /home/marc/.composer/vendor/drush/drush/commands/core/drupal/site_install.inc(78): drush_op('install_drupal',
Object(Composer\Autoload\ClassLoader), Array)
#7 /home/marc/.composer/vendor/drush/drush/commands/core/site_install.drush.inc(289):
drush_core_site_install_version(NULL, Array)
#8 [internal function]: drush_core_site_install()
#9 /home/marc/.composer/vendor/drush/drush/includes/command.inc(368): call_user_func_array('drush_core_site...',
Array)
#10 /home/marc/.composer/vendor/drush/drush/includes/command.inc(219): _drush_invoke_hooks(Array, Array)
#11 [internal function]: drush_command()
#12 /home/marc/.composer/vendor/drush/drush/includes/command.inc(187): call_user_func_array('drush_command', Array)
#13 /home/marc/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(62): drush_dispatch(Array)
#14 /home/marc/.composer/vendor/drush/drush/drush.php(70): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#15 /home/marc/.composer/vendor/drush/drush/drush.php(11): drush_main()
#16 {main}

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.

webchick’s picture

marcvangend’s picture

Yes, 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.

marcvangend’s picture

Ha, 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 with drush si minimal, it works flawlessly. Go figure.

From the UI, both standard and minimal work fine.

nicoloye’s picture

I 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.

Status: Needs review » Needs work

The last submitted patch, 10: site-name-default-2473709-10.patch, failed testing.

marcvangend’s picture

I created an issue against Drush, drush site-install breaks if minimal.profile is not present, regarding the drush si problem.

marcvangend’s picture

update:
It looks like we're getting closer to finding the cause of the drush si problem. 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.

greg.1.anderson’s picture

I 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.

marcvangend’s picture

I have verified that Greg's commit to Drush solves the drush si problem, so that should no longer block this issue.

yoroy’s picture

StatusFileSize
new32.7 KB

Wordpress (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"?

yoroy’s picture

Sorry, this happens during install of course and site name is required there, so that screenshot won't happen.

yoroy’s picture

Then 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.

marcvangend’s picture

Issue summary: View changes
StatusFileSize
new36.87 KB

Thanks 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 > System later - 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?

nicoloye’s picture

I 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 ?

yoroy’s picture

You'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.

marcvangend’s picture

Yoroy, 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.

nicoloye’s picture

Assigned: martin mayer » nicoloye

You'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.

nicoloye’s picture

Here is the patch to add a placeholder.

nicoloye’s picture

Status: Needs work » Needs review
marcvangend’s picture

Issue summary: View changes
StatusFileSize
new1.58 KB
new36.9 KB

I rolled a new patch because the code was perfect, but the inline docs were not updated.

Screenshot of the form with placeholder:

nicoloye’s picture

Oops, sorry for the docs !

webchick’s picture

I 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.

webchick’s picture

Status: Needs review » Needs work

And 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."

yoroy’s picture

Correct 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.

marcvangend’s picture

StatusFileSize
new1.56 KB

Thanks 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.

marcvangend’s picture

Status: Needs work » Needs review
webchick’s picture

So 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.

marcvangend’s picture

@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.

yoroy’s picture

Status: Needs review » Needs work
Issue tags: -Needs usability review

Yeah, lets exclude it from minimal.

marcvangend’s picture

OK, 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.

pjbaert’s picture

StatusFileSize
new1.57 KB

I combined the patch from #10 - that removes the minimal.profile file & #39 - that updates the standard.profile file.

pjbaert’s picture

Status: Needs work » Needs review
StatusFileSize
new372.4 KB

Added a screenshot

vinmassaro’s picture

Status: Needs review » Reviewed & tested by the community

Tested this patch and it correctly:

  • Removes default from minimal install profile
  • Sets site name default on standard install profile to 'My site'

Setting to RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This is a usability improvement and allowable as per the beta evaluation. Committed 2c0cfe9 and pushed to 8.0.x. Thanks!

  • alexpott committed 2c0cfe9 on 8.0.x
    Issue #2473709 by nicoloye, marcvangend, pjbaert, yoroy, webchick: Do...
webchick’s picture

StatusFileSize
new46.65 KB

Installed 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.