0

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']);

1 Answers1

0

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

composer udpate
  • i tried this solution but i got this error `Problem 1 - Installation request for sonata-project/doctrine-orm-admin-bundle dev-master -> satisfiable by sonata-project/doctrine-orm-admin-bundle[dev-master]. - sonata-project/doctrine-orm-admin-bundle dev-master requires sonata-project/admin-bundle 3.x-dev@dev -> no matching package found. Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see for more details. ` – Anass Boukalane Apr 21 '16 at 16:01
  • Try to update the bundle itself: composer update sonata-project/admin-bundle – Saint - Cyr MAPOUKA Apr 22 '16 at 10:32
  • `- The requested package sonata-project/doctrine-orm-admin-bundle == 2.3.3.0 could not be found. - Can only install one of: sonata-project/block-bundle[2.3.9, 2.2.13]. - Can only install one of: sonata-project/block-bundle[2.3.9, 2.2.13]. - Can only install one of: sonata-project/block-bundle[2.3.9, 2.2.13]....` – Anass Boukalane Apr 22 '16 at 11:33
  • which Symfony version are you using ? – Saint - Cyr MAPOUKA Apr 22 '16 at 13:43
  • i am using symfony 2.8 – Anass Boukalane Apr 22 '16 at 15:01
  • composer require sonata-project/admin-bundle:3.x-dev@dev – Saint - Cyr MAPOUKA Apr 22 '16 at 15:25
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/109932/discussion-between-anass-boukalane-and-saint-cyr-mapouka). – Anass Boukalane Apr 22 '16 at 15:32