All Questions
Tagged with sonata-media-bundle sonata
59 questions
0
votes
0
answers
164
views
Try to update Sonata, have error with jms-serializer
I need to update my bundles for security reasons but when i try to do a composer update, i have a lot of problem with sonata.
First, SonataCore, sonataMedia and JMS-serializer disappear.
bundles.php
...
3
votes
1
answer
118
views
Preview column disappears when modifying Sonata Media Bundle
I am modifying the Sonata Media Bundle's media admin screen to show a new field. After using the Easy Extends tool to extend the bundle, I create a very small class to do this with:
namespace App\...
2
votes
1
answer
282
views
Dependency on a non-existent service "SonataMedia/MediaAdmin/inner_row_media.html.twig"
Using Sonata's Easy Extends tool, I am extending the MediaAdmin base class and overriding the existing service for that class. In doing so, I've converted this XML service definition (in the vendor ...
0
votes
1
answer
211
views
SonataMedia Bundle: Create Media Entity throws "is_file() expects parameter 1 to be a valid path, string given"
I want to create an image media entity (using SonataMediaBundle) with the following code:
$media = new Media();
$media->setBinaryContent($binaryImageContent);
$media->setContext('default');
$...
0
votes
1
answer
383
views
Sonata Media Bundle - INVALID MODE
I am using Sonata Admin Bundle and Sonata Media Bundle. I use those versions. Symfony Version is 4.4.3
sonata-project/admin-bundle 3.58.0 The missing Symfony Admin Generator
sonata-...
1
vote
1
answer
282
views
Sonata Media Bundle Custom Provider not mapping request data
I have a custom ImageProvider to use with Sonata's Media Bundle.
Unfortunetly when I click submit, the form fields are placed into extra_data rather than the form object resulting in the error ...
0
votes
0
answers
127
views
Sonata MediaBundle .tif support
I'm trying to configure Sonata MediaBundle to upload various images formats but it's not working for .tif and .tiff image formats. After the upload it throws the following error:
request.CRITICAL: ...
1
vote
0
answers
57
views
Add Hidden Vimeo Video - Sonata Media Bundle
Hi.
I have a video on vimeo allowed to be embedded only on specific domain. However, when trying to add it through admin panel there's an error "This value should not be empty" and "This value should ...
0
votes
1
answer
282
views
Sonata media context ignored
I have defined new profile context in sonata_media.yaml:
...
default_context: profile
contexts:
default:
providers:
- sonata.media.provider.dailymotion
...
1
vote
1
answer
759
views
Sonata Media Bundle - How to get Image or Gallery by Id
Is it possible to get an image or gallery from Sonata Media Bundle by Id?
I know how to get an image or gallery which is related to an entity. But in this case I just want to get an image or gallery ...
0
votes
1
answer
274
views
how to set sonata form data_class on edit
I'm stuck with following error message on a project with symfony 2.8 and sonata admin/media bundle. I log in sonata and navigate to the list view were I have an edit button. I click the edit button ...
0
votes
1
answer
202
views
Sonata media bundle how to enable pixlr editing?
I have enabled pixlr as described here but is not enabled have tried many times.
There is no edit with pixlr button visible in media form.
Am I missing anything, Struggling from long time. Please ...
0
votes
1
answer
57
views
Sonata Project: Can't access media that referenced to SonataPage
I have a Page entity, that has many-to-one association to Media entity from Sonata MediaBundle
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/...
1
vote
1
answer
46
views
Disable "list" leaving only "add new" and "delete"
I have a project that is using SonataMediaBundle, and I am working on the GalleryAdmin page. My goal is to only allow uploads of images, rather than allowing images and videos.
I have set up ...
1
vote
1
answer
187
views
How to limit SonataMediaBundle gallery to a single provider?
An existing project on which I am working uses SonataMediaBundle. I like the Gallery option provided by that bundle, with one caveat: The gallery allows users to include not just images, but also ...
0
votes
1
answer
446
views
Sonata Media Bundle and Translation
I have a web portal built with Symfony 2.8 and Sonata Admin.
I am using Sonata Translation along with Gedmo's Translatable behavior to manage multilanguage entities in my website and it's working ...
3
votes
1
answer
742
views
Error trying to extend SonataMediaBundle "Impossible to invoke a method ("id") on a null variable"
I'm trying to extend the media class of SonataMediaBundle. I want to generate my own media to add more relations and properties.
But now I am stuck with this error:
Impossible to invoke a method (...
1
vote
1
answer
646
views
sonata_type_model_list how to delete image after select
Is it possible to delete a media after you have selected it (also in database)?
0
votes
0
answers
779
views
How upload multiple pictures in Sonata Media Bundle?
I have installed Sonata Media Bundle in a Symfony 2 project but I have an issue. Indeed, when I want to upload pictures I can just choose only one.
I would like to pick up multiple pictures, do you ...
1
vote
1
answer
1k
views
Symfony 3 - Sonata Aplication Media Bundle error
I was following the official documentation to install Sonata Media Bundle, I think it worked until the step when I use this command:
php bin/console sonata:easy-extends:generate --dest=src ...
0
votes
1
answer
1k
views
Image path in Sonata media bundle
I am trying to find the correct way to display an image with sonata media bundle.
cdn:
server:
path: %kernel.root_dir%/../web/uploads
The twig file
{% path user.image, 'big' %} <br&...
1
vote
1
answer
847
views
API Platform Sonata Media Bundle Gallery - Circular Reference
New in SF3, I use API Platform and Sonata Media Bundle.
I'm blocked while getting Gallery entity of Sonata using API Platform GET request.
"A circular reference has been detected when serializing ...
2
votes
1
answer
1k
views
Symfony : Sonata Media file preview
I work on a Symfony project with sonata bundles (admin and media). I need to display a file preview - PDF file - (link to download the file or a link to display it in new tab).
I searched a lot ...
2
votes
3
answers
2k
views
Default sort in Sonata Admin - Mediabundle
When I use the Sonata Mediabundle, the latest images which were uploaded come up on the 80th something page, therefore I thought it can be easier to create a new extended bundle, which changes the ...
1
vote
1
answer
604
views
Symfony 3.2.7 and sonata media bundle installation
I'm trying to install sonata media bundle on a symfony 3.2.7/php7/doctrine environnement.
I'm folowing this doc : https://sonata-project.org/bundles/media/3-x/doc/reference/installation.html
But I ...
0
votes
1
answer
156
views
Sonata Media CDN Rackspace
I have the next problem with Sonata Media:
I'm trying to use the Rackspace CDN for uploading images:
My config file looks like this based on current documentation:
cdn:
server:
path: %...
1
vote
1
answer
149
views
Upgrading symfony sonata to 3.x
i upgraded symfony-sonata to 3.x and getting error.
Fatal error: Uncaught Doctrine\ORM\Mapping\MappingException: The target-entity Application\Sonata\ClassificationBundle\Entity\Category cannot be ...
1
vote
1
answer
143
views
Show the thumbnails instead of the name of img with Symfony2 formbuilder
I am making the form which allow a user to select a img.
Symfony2.8 with sonataMediaBundle/
$form = $this->createFormBuilder($form)
->add('media',EntityType::class,array(
'...
0
votes
0
answers
516
views
Sonata Media Bundle: Customize Upload Folders
In my project I have two modules: Curriculum and Documents, both linked to a Company...and these have both file uploads that I managed to get working with Sonata Media and Sonata Classification
Well, ...
0
votes
1
answer
1k
views
SonataMediaBundle get image width and height
I have an image in my template:
{% media picture.media, 'reference' %}
How can I get width and height of that image?
2
votes
0
answers
157
views
Sonata Media Bundle - Upload only certain Mimetypes
I will upload only certain extensions/MimeTypes, e.g. jpeg. I searched the half day long and only find bad solutaions.
I don't want to validate after upload. Perfect would be, if I could see only the ...
1
vote
0
answers
376
views
sonata_type_collection show entities in different tabs
I'm trying to organize the way Sonata Admin shows sonata_type_collection.
It looks like this now:
In the source html code I see that all of that is meant to be tabs
<div class="sonata-ba-tabs">...
0
votes
1
answer
180
views
Sync thumbnails on multisite for Sonata Admin
I'm trying to generate thumbnails as I have new context for my media thumbnails. I was able to generate the thumbnails using the command:
php app/console sonata:media:sync-thumbnails sonata.media....
3
votes
2
answers
1k
views
There is no main category related to context: default
I want to add a profile picture to my admin class, but i got this error :
There is no main category related to context: default
I searched a lot but no solution. this is my code
config.yml
# app/...
1
vote
1
answer
610
views
Attempted to load class "Media" from namespace "Application\MediaBundle\Entity"
I want to add a profile picture to my admin class, but i got this error :
Attempted to load class "Media" from namespace "Application\MediaBundle\Entity".
Did you forget a "use" statement for e.g. "...
-1
votes
2
answers
1k
views
Internal page redirection in Symfony/Sonata
I'm trying to work on my sonata sandbox.
The problem that I face this message internal page redirection when I try to reload profile or register routes.
1
vote
2
answers
99
views
Symfony 2 Can't solve Construct
I'm getting this error
PHP Fatal error: Uncaught exception 'Symfony\\Component\\Debug\\Exception\\ContextErrorException' with message 'Catchable Fatal Error: Argument 8 passed to Sonata\\MediaBundle\...
0
votes
2
answers
2k
views
Adding properties to/extending Sonata Media entity
I want to add properties to the Sonata Media entity, but I just can't get it to work. I'm using Sonata Media Bundle 2.3, and have installed it according to the manual. I also extended it with the ...
5
votes
4
answers
3k
views
Sonata Media Bundle missing entity Category
I try to install the Sonata Media Bundle into the Symfony CMF following this guide: https://sonata-project.org/bundles/media/3-x/doc/reference/installation.html. This command
php app/console sonata:...
-2
votes
1
answer
271
views
The association \Entity\Specialists#images refers to the owning side field Application\Sonata\MediaBundle\Entity\Media#spec which does not exist
class Media extends BaseMedia
/**
* @var Specialists
*
* @ORM\ManyToOne(targetEntity="Specialists", inversedBy="images")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="spec", ...
0
votes
1
answer
1k
views
Sonata User Bundle Avatar using Sonata Media Bundle, in custom form while update image updates old one, and also creating a new one
I'm working in Sonata User Bundle avatar using Sonata Media Bundle. Every thing works as expected in Sonata Admin(Backend). i.e while updating form admin, only the old file is replaced.(works good).
...
0
votes
1
answer
162
views
Sonata Media Bundle ftp connection configuration?
I am trying to configure Sonata Media Bundle ftp connection:
sonata_media:
filesystem:
ftp:
directory: /path-to-upload
host: http://ftp-server-host
...
-1
votes
2
answers
701
views
Sonata Media Bundle with Sonata Admin Bundle 3.0 (or 2.4)
I'm trying to find a combination of sonata bundles to work with both Sonata Media Bundle and Sonata Admin Bundle 3.0 (or 2.4), but with no success.
The versioning on the official documentation is a ...
-1
votes
1
answer
65
views
SonataMediaBundle : allow user to upload link
I am fairly new to symfony and I am currently doing a school project with it.
I have to make a functionality where my users can upload youtube link video (like a blog post but with a video). So I ...
1
vote
1
answer
502
views
Symfony Sonata MediaBundle, i cannot upload a big size PDF
I cannot upload a big size PDF File via Sonata MediaBundle, this is the error i got :
Uncaught PHP Exception Twig_Error_Runtime: "Impossible to access a key ("default") on a boolean variable ("") in ...
3
votes
2
answers
3k
views
Sonata media bundle - get pdf file by name or change filename on update
I currently use SonataAdminBundle and SonataMediaBundle.
I have a problem with the media bundle files because my pdf file is not saved with its name but with md5 or another format.
For example:
...
0
votes
1
answer
831
views
Integrate Sonata Media Bundle (Media Entity) and Sonata Classiffication Bundle (Tags Entity)
I need to integrate this two bundles to be able to add Tags to an Media Entity (Image, Video, etc.).
I'm using:
"sonata-project/media-bundle":"version": "2.3.1"
"sonata-project/classification-bundle"...
1
vote
1
answer
2k
views
Symfony2 Overriding Sonata media Image provider.(Passing interface to constructor)
I want to override the image provider of SonataMediaBundle, however, when I override it, I get the error, when the constructor is called:
Catchable Fatal Error: Argument 8 passed to Application\...
5
votes
1
answer
2k
views
SonataMediaBundle - S3 AWS: 'The configured bucket "my-bucket" does not exist
I'm trying to configure the AWS s3 filesystem on my Sonata-Project, but I always get the following error:
The configured bucket "my-bucket" does not exist.
My sonata_media.yml:
cdn:
server:
...
0
votes
0
answers
81
views
Filtering SonataMediaBundle media on CKEditor browser depending on model?
My requirement is rather simple: I need a rich text editor with the ability to upload images in a Symfony 2 based system. I installed SonataMediaBundle and CoopTilleulsCKEditorSonataMediaBundle.
...