Skip to content

[2.0][Admin] Create new select attribute crashes on multiple values add press #17713

@diimpp

Description

@diimpp

Sylius version affected: 2.0.x

Description

Adding new attribute with type select, crashes on second empty value Add based of ux livecollection/twig component form.

Image

Image

Request payload

------geckoformboundary4e0817a58a2fbc59c9e7e572f95805c8
Content-Disposition: form-data; name="data"

{"props":{"type":"select","formName":"sylius_admin_product_attribute","sylius_admin_product_attribute":{"translations":{"en_US":{"name":""},"de_DE":{"name":""},"fr_FR":{"name":""},"pl_PL":{"name":""},"es_ES":{"name":""},"es_MX":{"name":""},"pt_PT":{"name":""},"zh_CN":{"name":""}},"type":"select","translatable":"1","position":"","code":"","configuration":{"choices":{"8722e856-f882-11ef-b1f8-ce021cddbd74":{"en_US":"","de_DE":"","fr_FR":"","pl_PL":"","es_ES":"","es_MX":"","pt_PT":"","zh_CN":""},"INF":{"en_US":"","de_DE":"","fr_FR":"","pl_PL":"","es_ES":"","es_MX":"","pt_PT":"","zh_CN":""}},"multiple":null,"min":"","max":""},"_token":"3407b5a803507cb9a3c865c1e9d091be._3CNKLKBaAF4IM_4hKmxDsvJpXwhiCAw_GpPt_SdyjM.kwS_XtnnG0dJZrqi3s3_fpic1hBi3XAIqAQB9J72owWyBfoa8-BZRz5z9w"},"isValidated":true,"validatedFields":[],"template":"@SyliusAdmin/product_attribute/form.html.twig","resource":null,"hookableMetadata":{"renderedBy":"sylius_admin.product_attribute.create.content","configuration":"[]","prefixes":["sylius_admin.product_attribute.create.content","sylius_admin.common.create.content"]},"@attributes":{"id":"live-117410081-0"},"@checksum":"Xs5L91heU0UpiVxiJX3AQTbJ7YWStr1x5Ms0J98zdRo="},"updated":{},"args":{"name":"sylius_admin_product_attribute[configuration][choices]"}}
------geckoformboundary4e0817a58a2fbc59c9e7e572f95805c8--

Steps to reproduce

  1. Visit https://v2.demo.sylius.com/admin/product-attributes/select/new
  2. Leave form empty, create single value, type anything into English value.
  3. Press Create, see form validation error.
  4. Press Add again.
  5. It will either crash immediately or will take few attempts to repeat all steps to reproduce.

Possible Solution
😶

Metadata

Metadata

Assignees

No one assigned

    Labels

    AdminAdminBundle related issues and PRs.BugConfirmed bugs or bugfixes.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions