Development

#4946 (Doctrine Admin Generator 1.2 with sfWidgetFormInputFile)

You must first sign up to be able to contribute.

Ticket #4946 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

Doctrine Admin Generator 1.2 with sfWidgetFormInputFile

Reported by: Tiago.Ribeiro Assigned to: Jonathan.Wage
Priority: major Milestone: 1.2.0 RC1
Component: sfDoctrinePlugin Version: 1.2.0 DEV
Keywords: Cc: Stephen.Ostrow
Qualification: Unreviewed

Description

When using sfWidgetFormInputFile with the new admin generator with Doctrine, the following error occurs (silently!):

symfony [err] {InvalidArgumentException} This form is multipart, which means you need to supply a files array as the bind() method second argument.

To fix this, the generated code should have the second parameter in the bind function:

    $form->bind($request->getParameter('XXX'), $request->getFiles('XXX'));

Change History

11/15/08 22:18:15 changed by FabianLange

  • owner changed from jwage to Jonathan.Wage.

11/17/08 08:37:39 changed by Stephen.Ostrow

  • cc set to Stephen.Ostrow.
  • version set to 1.2.0 DEV.
  • milestone changed from 1.2.0 to 1.2.0 RC1.

@Tiago.Ribeiro: Did you get this to work after adding that in? I have the processForm function overloaded so that I have the form bind with the files. But I can't get the admin-generator to save the file. It saves the rest of the form and does not give any errors, but does not upload the file or save it's filename.

11/17/08 09:25:55 changed by Stephen.Ostrow

Nevermind. I got the file upload to work once the processForm is overloaded correctly. I had to modify my model to save the file and set its field correctly by following this: http://www.symfony-project.org/book/forms/1_1/en/11-Doctrine-Integration

11/17/08 22:43:32 changed by Jonathan.Wage

  • status changed from new to closed.
  • resolution set to fixed.

(In [13084]) [1.2] sfPropelPlugin: fixes issue with admin generator and multi-part file forms (closes #4946)

11/17/08 22:44:05 changed by Jonathan.Wage

(In [13085]) [1.2] sfDoctrinePlugin: fixes issue with admin generator and multi-part file forms (closes #4946)

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.