Skip to content

[Form] Handle document is broken after update to 2.6.5 #13961

@mrohnstock

Description

@mrohnstock

After updating Symfony from 2.6.4 to 2.6.5 handling (MongoDB) document as Field is broken.

Example FormType:

public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder->add('terminal', 'document', array('label' => 'terminal', 'required' => false, 'class' => 'company\ExampleBundle\Document\Terminal'));
}

Submitted Form is not valid, Profiler told me:

Symfony\Component\Validator\ConstraintViolation
Object(Symfony\Component\Form\Form).children[terminal] = 546e4a2d46139fca3b413051

Caused by:

Symfony\Component\Form\Exception\TransformationFailedException
Unable to reverse value for property path "terminal": The choice "546e4a2d46139fca3b413051" does not exist or is not unique

Caused by:

Symfony\Component\Form\Exception\TransformationFailedException
The choice "546e4a2d46139fca3b413051" does not exist or is not unique

But document 546e4a2d46139fca3b413051 exists and is unique. Reverting symfony back to 2.6.4 does not lead to this issue and submitted form is valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy