In the "form" function found in \core\modules\views_ui\lib\Drupal\views_ui\ViewCloneFormController.php the "#default_value" array key is unconditionally assigned twice.

offending code:

$form['label'] = array(
      '#type' => 'textfield',
      '#title' => $this->t('View name'),
      '#required' => TRUE,
      '#size' => 32,
      '#default_value' => '',
      '#maxlength' => 255,
      '#default_value' => $this->t('Clone of @label', array('@label' => $this->entity->label())),
#2 2091135-2.patch669 bytessidharthap
PASSED: [[SimpleTest]]: [MySQL] 59,244 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


YesCT’s picture

Title: Duplicate array key in ViewCloneFormController » Duplicate array key default_value in ViewCloneFormController
sidharthap’s picture

Status: Active » Needs review
669 bytes
PASSED: [[SimpleTest]]: [MySQL] 59,244 pass(es). View

patch to remove blank value as default value.

mcrittenden’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and tests pass.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 3926592 and pushed to 8.x. Thanks!

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