Closed lucasgranberg closed 9 years ago
Same problem here.
Basically just setup an Entity with a boolean inside.
Add this : $formMapper ->add('is_something', null, $options) ; Triggers the error when editing the object.
SF2.6 + SonataAdminBundle "~2.3".
Quick fix will be to override the Sonata template for now to get rid of this problem.
OK I just realized Sonata won't work with SF2.6 but SF2.3 ... I needed SF2.5 min for HWI using PropertyAccess component. So I will need to find a solution.
I had the same issue when trying to integrate SonataMediaBundle with SonataAdminBundle. The problem occurred when trying to add new media element from admin panel and the reason for this was that no provider
parameter was passed in the URL. I did these two things to get rid of this problem:
MediaAdmin
class to extend from Sonata\MediaBundle\Admin\ODM\MediaAdmin
(I'm using MongoDB)MediaAdminController
from SonataMediaBundle to the constructor of my MediaAdmin
class:services:
acme.admin.media:
class: Acme\MediaBundle\Admin\MediaAdmin
tags:
- { name: sonata.admin, manager_type: doctrine_mongodb, group: "Content", label: "Media" }
arguments:
- ~
- Acme\MediaBundle\Document\Media
- '%sonata.media.admin.media.controller%'
- @sonata.media.pool
FYI I'm using Sonata ver. 2.3 and Symfony ver. 2.6
@Thommas Sonata's bundles work with symfony 2.5. Seems there are issues with serialization of validation with Symfony 2.6
Same problem.
Just installed MediaBundle. Trying to add files to my entity: Entity:
/**
* @var Media
*
*
* @ORM\ManyToOne(targetEntity="Application\Sonata\MediaBundle\Entity\Media", cascade={"all"}, fetch="EXTRA_LAZY")
* @ORM\JoinColumn(name="media_id")
*/
private $file;
Admin:
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
// ...
->add('file', 'sonata_type_model_list', [], [
'link_parameters' => [
'context' => 'client_build',
'provider' => 'sonata.media.provider.file',
]
])
// ...
;
}
When I trying to add new file in the admin dashboard, I get this error.
PHP 5.6.8-pl0-gentoo
"symfony/symfony": "2.6.*", [2.6.6]
"sonata-project/core-bundle": "dev-master",
"sonata-project/intl-bundle": "~2.2", [2.2.1]
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/easy-extends-bundle": "dev-master",
"sonata-project/user-bundle": "dev-master",
"sonata-project/datagrid-bundle": "dev-master",
"sonata-project/classification-bundle": "dev-master",
"sonata-project/media-bundle": "dev-master",
Any news on this? I still seem to have this problem with current dev-master
s.
While uploading images using the Sonata Admin class works fine the sonata_type_model_list
field type fails.
Correcting myself. The error message only appeared when opening the AJAX url in a new tab.
When looking at the console and the HTML Response it was a permission problem with mkdir
.
So far everything seems to work fine!
Ill close this issue as I don't think its an issue anymore and I can't check it out right now.
:+1:
I have Sonata Admin and Media set to "2.4.*@dev" and I get this error. I tried looking up the problem and I noticed that the request is empty in the SonataAdminBundle:CrudController.
The error comes from this file becouse the admin.formtabs variable is set to false.