The "Delete domain-specific aliases" checkbox wording is not clear

Created on 14 July 2024, 4 months ago

Problem/Motivation

I hope I can make some suggestions here from my initial use of this module, which has been great for my needs with a new website build.

I found the wording of the checkbox "Delete domain-specific aliases" to be a tad confusing.

My initial thought was which domain-specific aliases will this delete? Does this mean the aliases below this checkbox will be deleted or every domain-specific alias? It was also confusing because I only had 1 domain assigned to some nodes, yet the checkbox was indicating I could delete multiple when there aren't multiple.

Proposed resolution

Maybe this checkbox can have a different label? Such as "Delete all aliases for this node", with a description of something like "Marking this as checked and saving the node will delete all aliases for this node, this saves you the trouble of having to delete them one by one".

Also as mentioned, some nodes will only have 1 domain, in which case having this checkbox is really unnecessary because they can easily and more intuitively just remove the path from the path text field.

Could we check how many domains are assigned to a node before adding this checkbox? just adding:

if (count($entity->get('field_domain_access')->getValue()) > 1) {
  // Add an option to delete all domain paths. This is just for convenience
  // so the user doesn't have to manually remove the paths from each domain.
  $form['path']['widget'][0]['domain_path']['domain_path_delete'] = [
    '#type' => 'checkbox',
    '#title' => $this->t('Delete domain-specific aliases'),
    '#default_value' => FALSE,
  ];
}
📌 Task
Status

Active

Version

1.3

Component

Code

Created by

🇬🇧United Kingdom joehuggans Harrogate, UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024