You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just tried to implement the RuianUploadifyBundle into my project but ran into some problems after sending the form. Upload itself is running fine and the file is uploaded to the set directory. But when i hit the submit button and the form is send to the "new" action it runs into an exception.
"Warning: Missing argument 1 for Ruian\UploadifyBundle\Model\Resource::__construct(), called in /Applications/MAMP/htdocs/Lauschtour/vendor/symfony/src/Symfony/Component/Form/Extension/Core/Type/FieldType.php on line 142 and defined in /Applications/MAMP/htdocs/Lauschtour/vendor/bundles/Ruian/UploadifyBundle/Model/Resource.php line 19"
The Form is send with the following request:
Form ->bind (array('baseData' => array('title' => 'test', 'shortDescription' => 'test', 'longDescription' => 'test', 'language' => '4'), '_token' => '6015ad221b39db0c355928d6236cd2b254e96831', 'file' => '/uploads/files/dda8271fcb3bd266a5f1cf18fa936505495c543d.png', 'picture_uploadify' => null))
Here is my "new" action:
public function editCategoryAssetAction($categoryId, $assetTypeId, $assetId)
{
if ($assetId)
{
$asset = $this->getDoctrine()->getRepository('LauschtourMainBundle:Asset')->find($assetId);
}
else
{
$assetType = $this->getDoctrine()->getRepository('LauschtourMainBundle:AssetType')->find($assetTypeId);
$asset = new Asset();
$asset->setCategory($category);
$asset->setAssetType($assetType);
}
if ($asset)
{
$form = $this->createForm(new EditAssetType($category->getMuseum()), $asset);
if ($this->getRequest()->getMethod() == 'POST')
{
// bind form data tu user
$form->bindRequest($this->getRequest());
if ($form->isValid())
{
// update user
$asset->save($this->getDoctrine());
// send back to blank page
return $this->redirect($this->generateUrl('manage_category_asset_edit', array('categoryId' => $categoryId, 'assetTypeId' => $assetTypeId)));
}
}
}
return $this->render('LauschtourFrontendBundle:Asset:editCategoryAsset.html.twig',array(
'category' => $category,
'assetTypeId' => $assetTypeId,
'asset' => $asset,
'form' => $form->createView(),
'referer' => $this->getRequest()->headers->get('referer'),
'success' => $this->getRequest()->get('success')));
}
Form Builder:
public function buildForm(FormBuilder $builder, array $options)
{
$museum = $this->museum;
Hey,
I just tried to implement the RuianUploadifyBundle into my project but ran into some problems after sending the form. Upload itself is running fine and the file is uploaded to the set directory. But when i hit the submit button and the form is send to the "new" action it runs into an exception.
"Warning: Missing argument 1 for Ruian\UploadifyBundle\Model\Resource::__construct(), called in /Applications/MAMP/htdocs/Lauschtour/vendor/symfony/src/Symfony/Component/Form/Extension/Core/Type/FieldType.php on line 142 and defined in /Applications/MAMP/htdocs/Lauschtour/vendor/bundles/Ruian/UploadifyBundle/Model/Resource.php line 19"
The Form is send with the following request:
Form ->bind (array('baseData' => array('title' => 'test', 'shortDescription' => 'test', 'longDescription' => 'test', 'language' => '4'), '_token' => '6015ad221b39db0c355928d6236cd2b254e96831', 'file' => '/uploads/files/dda8271fcb3bd266a5f1cf18fa936505495c543d.png', 'picture_uploadify' => null))
Here is my "new" action:
public function editCategoryAssetAction($categoryId, $assetTypeId, $assetId)
{
Form Builder:
public function buildForm(FormBuilder $builder, array $options)
{
$museum = $this->museum;
Does someone have an idea?
The text was updated successfully, but these errors were encountered: