Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong render of item in CollectionType #1087

Open
majoskorec opened this issue Aug 19, 2022 · 0 comments
Open

wrong render of item in CollectionType #1087

majoskorec opened this issue Aug 19, 2022 · 0 comments

Comments

@majoskorec
Copy link

Summary
symfony add "collection_entry" block prefix to CollectionType entries in 5.1
symfony/symfony#36088

it cause that entity type in collection in collection is rendering as input type

Steps to reproduce

final class TestType extends Abstract`Type
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('coll1', \Oro\Bundle\FormBundle\Form\Type\CollectionType::class, [
            'entry_type' => Test2Type::class,
            'allow_add' => true,
            'allow_delete' => true,
            'prototype' => true,
            'handle_primary' => false,
        ]);
    }
}

final class Test2Type extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('coll2', \Oro\Bundle\FormBundle\Form\Type\CollectionType::class, [
            'entry_type' => EntityType::class,
            'entry_options' => [
                'class' => User::class,
            ],
            'allow_add' => true,
            'allow_delete' => true,
            'prototype' => true,
            'handle_primary' => false,
        ]);
    }
}

Actual Result
coll2 is text input
image

Expected Result
coll2 should by entity select type

Details about your environment

  • OroPlatform version: 5.*
  • PHP version: 8.1.*
  • Database MySQL version 8.0

Additional information
when i remove "collection_entry" from block prefix of CollectionType it start working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant