symfony2admingenerator / AvocodeFormExtensionsBundle

(old-legacy) Symfony2 form extensions for Admingenerator project (also working standalone!)
Other
48 stars 31 forks source link

Collection_Upload and Propel #118

Open ndoulgeridis opened 10 years ago

ndoulgeridis commented 10 years ago

Hello,

If there a sample code how to achieve admingenerator+AvocodeFormsExtensions+Propel (and vichuploader probably)? A simple sample code with Gallery-Images will help very much to see how it works.

Thanks a lot.

ioleo commented 10 years ago

@crash21 i don't use propel, but:

ndoulgeridis commented 10 years ago

Hmm I get

Key "id" in object with ArrayAccess of class "Symfony\Component\Form\FormView" does not exist in AvocodeFormExtensionsBundle:Form/CollectionUpload:template_download.html.twig at line 59

Any ideas how to fix it?

sescandell commented 9 years ago

Hi @crash21

This is because the AbstractType defined in your "type" option for your afe_collection_upload field doesn't contain any "id" field.

Why id? Simply because it is the default value of primary_key option from your afe_collection_upload field. Two things to fix it:

  1. add an id field to your Type
  2. change the primary_key option to the right one for you