Problem/Motivation

I'm using schema metatag along with the new Drupal Canvas module. When I try to save the page in Drupal Canvas I always get the following error:

The submitted value <em>0</em> in the <em>Pivot </em>element is not allowed.

This happens for all instances of the pivot select field. I would have to edit every pivot field for every page.

Steps to reproduce

Install Drupal Canvas
Install Metatag
Install Schema Metatag
Create a page in Drupal Canvas
Save the page

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

eric heydrich created an issue. See original summary.

mherchel’s picture

wim leers’s picture

penyaskito’s picture

\Drupal\schema_metatag\Plugin\schema_metatag\PropertyTypeBase::form does

$value_sub_property = $input_values['value'][$sub_property_name]['pivot'] ?? 0;

and that's a select, with only

      '#options' => [
        1 => $this->t('Pivot'),
      ],

and

     '#empty_value' => '',

penyaskito’s picture

Status: Active » Needs review
penyaskito’s picture

Issue tags: +Experience Builder
mherchel’s picture

Status: Needs review » Reviewed & tested by the community

Worked for me! Note I had to re-create the Canvas page though. Thank you!

thejimbirch’s picture

Status: Reviewed & tested by the community » Fixed

Merge train started. Thanks for the finding and fix!

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.

thejimbirch’s picture

Status: Fixed » Active
interx’s picture

Thanks! The fix works for me on new edits.
Note, I had to discard already staged changes and recreate them to get rid of the errors.

thejimbirch’s picture

Status: Active » Fixed

Fixed the issue with the tests and started the merge train.

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.

damienmckenna’s picture