There are two cases in node.schema.yml and comment.schema.yml, where a seqeunce's inner type is incorrectly set as "sequence" again.
They both belong to "Unpublish by keyword" actions. I'm setting them as "string", assuming they aren't supposed to be different per language (translatable).

CommentFileSizeAuthor
mistyped-sequence.patch1.02 KBherom

Comments

dawehner’s picture

For me the code looks as if it would be an array:

  /**
   * {@inheritdoc}
   */
  public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $form['keywords'] = array(
      '#title' => t('Keywords'),
      '#type' => 'textarea',
      '#description' => t('The content will be unpublished if it contains any of the phrases above. Use a case-sensitive, comma-separated list of phrases. Example: funny, bungee jumping, "Company, Inc."'),
      '#default_value' => Tags::implode($this->configuration['keywords']),
    );
    return $form;
  }

  /**
   * {@inheritdoc}
   */
  public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
    $this->configuration['keywords'] = Tags::explode($form_state['values']['keywords']);
  }
herom’s picture

Well, "Keywords" is. It's "Keyword" that shouldn't be a "sequence".

       type: sequence     <=== This is correct.
       label: 'Keywords'
       sequence:
-        - type: sequence    <=== This is incorrect.
+        - type: string
           label: 'Keyword'
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Thank you for the explanation!

webchick’s picture

Hm. Is it possible to throw some kind of validation error or something so others don't make this mistake?

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Bumping back to NR temporarily for that question.

herom’s picture

@Gabor said these issues would be detected by #2183983: Find hidden configuration schema issues.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Great, we do have a "followup"

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Ok, great. Let's get this in, then.

Committed and pushed to 8.x. Thanks!

  • webchick committed d82eb50 on 8.0.x
    Issue #2315189 by herom: Fixed 2 schema element types mistyped as...

Status: Fixed » Closed (fixed)

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