Search code examples
symfonysonata-adminsymfony-sonata

SONATA_TYPE_MODEL_AUTOCOMPLETE does not work


with sonata Admin bundle dev-master, I've relationship like Many Vote can be linked to only One PollingStation as the number of the PollingStation entities are so plenty (over 40000) I've to use SONATA_TYPE_MODEL_AUTOCOMPLETE (propose any best way if you think it exists) but after setting up the configureFormFields like in the official documentation, I get the following error:

Notice: Undefined index: read_only

$builder->setAttribute('minimum_input_length', $options['minimum_input_length']);
    $builder->setAttribute('items_per_page', $options['items_per_page']);
    $builder->setAttribute('req_param_name_page_number', $options['req_param_name_page_number']);
    $builder->setAttribute('disabled', $options['disabled'] || $options['read_only']);
    $builder->setAttribute('to_string_callback', $options['to_string_callback']);

Solution

  • The issue has been fixed by the sonata project contributors long time ago so just do:

    composer udpate