Closed (won't fix)
Project:
Drupal core
Version:
8.9.x-dev
Component:
install system
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
2 Oct 2011 at 15:41 UTC
Updated:
11 Jan 2021 at 09:54 UTC
Jump to comment: Most recent
I've seen this particular snippet in gazillions of install profiles in the meantime:
/**
* Implements hook_form_FORM_ID_alter().
*
* Allows the profile to alter the site configuration form.
*/
function coredev_form_install_configure_form_alter(&$form, $form_state) {
// Pre-populate the site name with the server name.
$form['site_information']['site_name']['#default_value'] = $_SERVER['SERVER_NAME'];
}
It's time to reverse the logic for the default value, and instead make install profiles override it to an empty string or whatever.
| Comment | File | Size | Author |
|---|---|---|---|
| drupal8.install-site-name.0.patch | 1.55 KB | sun |
Comments
Comment #1
Everett Zufelt commentedWhat's the benefit of this change? Speaking as only one person, I almost always overwrite the value anyway, I would prefer it left empty.
Comment #2
sunThe goal of this change is to remove unnecessary code from many installation profiles, which simply copied the hook_form_alter() from the core profiles in order to prepopulate the default value for the site name.
My intentions are purely technical - solely targeting needless duplication of code due to a weird default value in core's installer.
While the actual default value may be debatable on its own, that's not the topic of this issue.
Comment #3
marcvangendI agree with Everett, it doesn't make sense to use the server name as default. If that's not the topic of this issue, then we should make it the topic of this issue.
Have you asked yourself why this particular snippet is duplicated over and over again? I think it's just because default.profile (D6) and standard.profile (D7) do it, and people simple copy it as 'best practice' without a second thought.
Two days ago, I was observing my sister (she's a doctor, not a geek; she is "Verity") 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.
Comment #4
sundrupal8.install-site-name.0.patch queued for re-testing.
Comment #14
quietone commentedThe patch here removes lines from standard.profile and minimal.profile that have since been removed in #2473709: Do not use SERVER_NAME as default value for the site name. The removal of those lines is the goal of this issue, See #2. That strongly suggests that there is nothing to do here.
Another change in the patch is to add the server name as the default site name in the install process. Comment #3 gives a example of why that is not a good idea. In #2473709: Do not use SERVER_NAME as default value for the site name the site name with a placeholder. Again, this caused problems and the place holder was removed, see #2494131: Placeholder text for site name in installer can be confusing.
It seems that leaving the site name blank has been chosen by the community. Closing this as won't fix.
Of course, if you disagree, reopen the issue by setting the status to 'Active' and comment on why you think this should be done.
Thx.