Problem/Motivation

The sites SiteSetting plugin (Sites) has no title setting, yet sites_group's label-sync (#3591238: Set site title from group label) reads settings.sites.title. Add a first-class Title field to the site settings form so a site has a human name independent of any form's label field.

  1. New title setting (default: '', locked, non-environment).
  2. Required Title textfield on the site settings form, defaulting to the entity label.
  3. The site id machine-name is generated from the Title for new sites.

Issue fork sites-3605432

Command icon 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

hydra created an issue. See original summary.

hydra’s picture

hydra changed the visibility of the branch 3605432-add-a-title to hidden.

hydra’s picture

Removed the entity dependency from the title setting. The form no longer reaches into callback_object->getEntity():

The Title field's default now comes from the saved title setting (getSetting('title')) rather than the entity label.
The "new site" check that gates id generation now derives from the locked id setting being empty, instead of $entity->isNew().
Trade-off: the Title no longer auto-prefills from the entity label on a new site — it starts empty and is filled by the (already required) field. Unit tests updated to drop the entity mocks and drive behavior off saved settings. phpstan/phpcs/cspell/phpunit all green locally.

  • hydra committed 468a2874 on 1.x
    task: #3605432 Add a "title" site setting and generate the site id from...
hydra’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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