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())),
    );
CommentFileSizeAuthor
#2 2091135-2.patch669 bytessidharthap
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT’s picture

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

Status: Active » Needs review
FileSize
669 bytes

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.