Overview

Steps to reproduce:

  1. Create a new component
  2. Add a new property with the type "Checkbox"
  3. Try to add component to library
  4. Observe there's a 422 error

Response from server:

{
    "errors": [
        {
            "detail": "This value should be of the correct primitive type.",
            "source": {
                "pointer": "props.checkbox.examples.0"
            }
        }
    ]
}

Proposed resolution

User interface 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

lauriii created an issue. See original summary.

wim leers’s picture

Seems like either a simple matter of the client not sending a boolean example value, or the server somehow transforming it incorrectly.

wim leers’s picture

The UI should surface the validation errors provided by the server explicitly, instead of telling the user to look at the browser console, by doing #3503547: Display validation errors in dialogs that create sections.

lauriii’s picture

Issue tags: +beta blocker

omkar-pd made their first commit to this issue’s fork.

balintbrews’s picture

Coincidentally, I just worked on this fix this morning, but only later found out about this issue from Lauri. Thanks, @omkar-pd, for getting started! I'm pushing my fixes to your branch.

balintbrews’s picture

Status: Active » Needs review
libbna’s picture

Assigned: Unassigned » libbna
libbna’s picture

Assigned: libbna » Unassigned
StatusFileSize
new1.39 MB

I have reviewed this issue by following the provided steps and can confirm that the issue is now resolved. I’ve attached a GIF as proof of the working functionality.

jessebaker made their first commit to this issue’s fork.

  • jessebaker committed 936ee9e7 on 0.x authored by omkar-pd
    Issue #3520706 by omkar-pd, balintbrews, lauriii, libbna: Can't add in-...
jessebaker’s picture

Status: Needs review » Fixed

Reviewed and tested too. Merged!

Status: Fixed » Closed (fixed)

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