193 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
145
views
Invalid mapping file BaseMedia.mongodb.xml
I have installed Sonata Media Bundle ^3.23, when installing doctrine-mongodb-bundle ^4.1, i receive the below error:
In MappingException.php line 236
The mapping file vendor/sonata-project/media-...
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
1
answer
482
views
How to save pdf files with Sonata Media Bundle
I tried to save my pdf files into the file system of sonata media bundle and insert the correct database entry.
I created my file with dompdf as following:
$dompdf = new Dompdf($pdfOptions);
$html = ...
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
55
views
Add New button in Symfony Sonata Media Gallery throws errors with PHPCR
I am having a hard time wrapping my head around this, I have started a project based on Symfony 4 + PHPCR + CMF + Sonata admin, I do not have much experience with Symfony and I suppose I should have ...
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 ...
5
votes
1
answer
2k
views
Prevent direct access to uploaded files only for unauthorized users - Symfony
I am trying to give direct access to uploaded files only for logged in users in my website for security concerns. I tried this configuration but it seems to be working on download image.
This is my ...
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
...
2
votes
1
answer
680
views
Access Denied for view and download routes in SonataMediaBundle and Symfony 4
I use Symfony 4 (more precise 4.1) with SonataAdminBundle and SonataMediaBundle.
This is my config/routes/sonata_media.yaml:
sonata_media_gallery:
resource: '@SonataMediaBundle/Resources/config/...
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 ...
1
vote
1
answer
406
views
How to show all the context list in Sonata Media Bundle for each module?
I have defined context in sonata_media.yml (below):
sonata_media:
....
contexts:
default: # the default context is mandatory
download:
strategy: sonata....
0
votes
1
answer
330
views
BinaryContent for a pdf is null
I am using Sonata Media Bundle to let users upload PDF files. I want to use Imagick to create a preview image of a pdf document. I have a $media object that holds information about my pdf.
When I do ...
0
votes
1
answer
1k
views
Sonata Media Bundle Template in Symfony 4
I have installed Sonata Media Bundle in Symfony 4 and all is correct, but something is different respect t Symfony 3.
I can't see the service in Sonata Admin and when I add the sonata media bundle ...
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 ...
2
votes
1
answer
1k
views
sonata media bundle modify MediaType
I use symfony 3.4 with the sonata media bundle. Using the MediaType in a form works fine like this:
$this->builder->->add('document', MediaType::class,
['label' =>...
2
votes
0
answers
62
views
Symfony 3 | JMSi18nRoutingBundle exclude SonataMediaBundle routes
Guys I use JMSi18nRoutingBundle with some JMS bundles too, so I wanted to exclude sonata media routes, so i tried : i18n = false
by this code
media:
resource: '@SonataMediaBundle/Resources/...
0
votes
1
answer
134
views
Slightly different syntax for Twig media reference yields different results -- why?
I am working on a project that uses Twig and the Sonata Media Bundle.
In one part of my template, I have the following line:
<img src="{% path media, 'reference' %}" >
... and in that same ...
0
votes
0
answers
33
views
Create load failure on a 413 in Sonata Media bundle?
I am on a project that uses Sonata Media Bundle for image uploads.
Currently, when a CMS user uploads an image that is too large for our system to handle, the upload simply stalls, without any ...
0
votes
1
answer
825
views
Install doctrine-mongodb-admin-bundle::error:To enable extensions, verify that they are enabled in your .ini files:
I am using Symfony 3.4 Flex and sonata-admin-bundle": "^3.33" & "php": "^7.0.8"...i want to installing doctrine-mongodb-admin-bundle.when i run
php composer.phar require sonata-project/doctrine-...
0
votes
1
answer
168
views
SonataMediaBundle Type error when trying to delete the link with media
i have project that uses sonataAdmin and sonataMedia
when i tried to delete the image using the check box provided by the bundle
click to see image
i get this error :
Type error: Argument 1 passed ...
1
vote
3
answers
910
views
Symfony Media bundle - "Impossible to invoke a method ("id") on a null variable."
Environment
Symfony 3.4.4 + FOSBundleUser + Sonata Admin + Media Bundle
Subject
I have installed Media Bundle.
I have configured it following the steps indicated in the Official documentation.
I ...
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 ...
-1
votes
1
answer
19
views
Is there a way to selectively prune media providers from an admin interface in Sonata Media Bundle?
I am building a Page entity in a Sonata-based application, and I want inline editing screens for two types of media: YouTube videos and images.
I am using sonata_type_collection twice to create two ...
0
votes
1
answer
776
views
Which admin_code to specify in sonata_type_collection?
In a Sonata project, I have a Page entity and a Media entity. My Page entity contains an images property that contains an ArrayCollection of Media entities. In my Page entity, I the following working ...
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 ...
2
votes
2
answers
2k
views
Symfony 4 Sonata Media Bundle Installation
I have a few errors during installation of Sonata Media Bundle on Symfony 4 application which had no place with Symfony 2.8.
The first error:
sensio/generator-bundle v3.1.6 requires symfony/...
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
447
views
Sonata Media exception 'The uploaded file is not found'
Uploading files more than 2MB size in Sonata Admin (v3.28.0) with Sonata Media Bundle (v3.10.0) in Symfony (v2.8.32) application results in error:
The uploaded file is not found
I just didn't found ...
4
votes
0
answers
1k
views
Sonata Media - file extension validation in admin
I just want to validate the extension of image that I upload in Sonata Admin (v3.28.0) with Sonata Media Bundle (v3.10.0) in Symfony (v2.8.32) application.
I've read all similar questions and Sonata ...
1
vote
1
answer
524
views
Sonata Media PNG compression with alpha channel
SonataMediaBundle increases PNG image size with this settings:
video_image:
providers:
- sonata.media.provider.image
formats:
medium: { width: 1306, quality: 100 }
Original ...
2
votes
2
answers
3k
views
Could not load type "sonata_media_type": class does not exist
Hello I use SonataMedia Bundle for the 1st time, but I can not reach the link with my entitie Post;
it gives me # "Could not load type "sonata_media_type": class does not exist. "#
here is my code:
...
1
vote
1
answer
1k
views
Symfony 3.4.2 - Unrecognized options "auto_generate_proxy_classes, naming_strategy, auto_mapping"
I'm making my first project Under Symfony 3.4
I'm currently looking to install Sonata News Bunfle to create a blog, I'm installing at the same time Sonata MediaBundle.
But I'm having a problem. I'm ...
1
vote
0
answers
76
views
Add transcript field to sonata media bundle youtube provider
I would like to extend the youtube provider in order to add a text field to add the transcript of the video.
I'm using Symfony 3.4 and the latest version of sonata media bundle.
Can anyone tell me how ...
1
vote
1
answer
547
views
Sonata Admin Media Picker
I am using Sonata Admin for my back-end and following this guide I was able to setup a relation between my entities and a media object.
This is the relation:
/**
* @var \Application\Sonata\...
1
vote
0
answers
541
views
The child node "db_driver" at path "sonata_media" must be configured symfony
I'm getting this error as I install the Sonata Media Bundle 2.3.0 in Symfony.
The child node "db_driver" at path "sonata_media" must be configured.
and while using the further command,
php app/...
1
vote
0
answers
316
views
Sonata Media Bundle gallery dont show image
i will try to add image gallery to my product entity. In my database all looks ok, in product table he had a gallery id, in admin panel i can set gallery to product. In twig when i try to show my ...
1
vote
0
answers
1k
views
Sonata MediaBundle configuration issue
i am using Symfony3.3
Error
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
The service "sonata.media.admin.media" has a dependency on a non-existent service "sonata....
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 ...
4
votes
0
answers
635
views
Sonata Media Bundle delete image programmatically
It seems that there is no documentation about how to delete images programmatically with Sonata Media Bundle.
I found another post saying that you need to call delete on the media manager.
Here is my ...
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&...