sonata-project / SonataMediaBundle

Symfony SonataMediaBundle
https://docs.sonata-project.org/projects/SonataMediaBundle
MIT License
451 stars 495 forks source link

Error after installing SonataMediaBundle using symfony flex #1519

Closed saymouMb closed 4 years ago

saymouMb commented 5 years ago

Environment

LAMP

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.43.0 3.43.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.13.0 3.13.0 Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  2.0.1  Cache library
sonata-project/core-bundle               3.13.7 3.13.7 Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.4.0  2.4.0  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.1.3  1.1.3  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.7.0  3.7.0  Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.5.0  2.5.0  Symfony SonataEasyExtendsBundle
sonata-project/exporter                  1.11.0 1.11.0 Lightweight Exporter library
sonata-project/google-authenticator      2.2.0  2.2.0  Library to integrate Google Authenticator into a PHP project
sonata-project/media-bundle              3.17.0 3.17.0 Symfony SonataMediaBundle
sonata-project/user-bundle               4.2.3  4.2.3  Symfony SonataUserBundle

### Symfony packages
$ composer show --latest 'symfony/*'

symfony/apache-pack          v1.0.1  v1.0.1  A pack for Apache support in Symfony
symfony/asset                v4.2.2  v4.2.2  Symfony Asset Component
symfony/browser-kit          v4.2.2  v4.2.2  Symfony BrowserKit Component
symfony/cache                v4.2.2  v4.2.2  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/config               v4.2.2  v4.2.2  Symfony Config Component
symfony/console              v4.2.2  v4.2.2  Symfony Console Component
symfony/contracts            v1.0.2  v1.0.2  A set of abstractions extracted out of the Symfony components
symfony/css-selector         v4.2.2  v4.2.2  Symfony CssSelector Component
symfony/debug                v4.2.2  v4.2.2  Symfony Debug Component
symfony/debug-bundle         v4.2.2  v4.2.2  Symfony DebugBundle
symfony/debug-pack           v1.0.7  v1.0.7  A debug pack for Symfony projects
symfony/dependency-injection v4.2.2  v4.2.2  Symfony DependencyInjection Component
symfony/doctrine-bridge      v4.2.2  v4.2.2  Symfony Doctrine Bridge
symfony/dom-crawler          v4.2.2  v4.2.2  Symfony DomCrawler Component
symfony/dotenv               v4.2.2  v4.2.2  Registers environment variables from a .env file
symfony/event-dispatcher     v4.2.2  v4.2.2  Symfony EventDispatcher Component
symfony/expression-language  v4.2.2  v4.2.2  Symfony ExpressionLanguage Component
symfony/filesystem           v4.2.2  v4.2.2  Symfony Filesystem Component
symfony/finder               v4.2.2  v4.2.2  Symfony Finder Component
symfony/flex                 v1.1.8  v1.1.8  Composer plugin for Symfony
symfony/form                 v4.2.2  v4.2.2  Symfony Form Component
symfony/framework-bundle     v4.2.2  v4.2.2  Symfony FrameworkBundle
symfony/http-foundation      v4.2.2  v4.2.2  Symfony HttpFoundation Component
symfony/http-kernel          v4.2.2  v4.2.2  Symfony HttpKernel Component
symfony/inflector            v4.2.2  v4.2.2  Symfony Inflector Component
symfony/intl                 v4.2.2  v4.2.2  A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/maker-bundle         v1.11.2 v1.11.2 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing bo...
symfony/monolog-bridge       v4.2.2  v4.2.2  Symfony Monolog Bridge
symfony/monolog-bundle       v3.3.1  v3.3.1  Symfony MonologBundle
symfony/options-resolver     v4.2.2  v4.2.2  Symfony OptionsResolver Component
symfony/orm-pack             v1.0.5  v1.0.5  A pack for the Doctrine ORM
symfony/panther              v0.2.0  v0.2.0  A browser testing and web scraping library for PHP and Symfony.
symfony/phpunit-bridge       v4.2.2  v4.2.2  Symfony PHPUnit Bridge
symfony/polyfill-intl-icu    v1.10.0 v1.10.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring    v1.10.0 v1.10.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72       v1.10.0 v1.10.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/process              v4.2.2  v4.2.2  Symfony Process Component
symfony/profiler-pack        v1.0.4  v1.0.4  A pack for the Symfony web profiler
symfony/property-access      v4.2.2  v4.2.2  Symfony PropertyAccess Component
symfony/property-info        v4.2.2  v4.2.2  Symfony Property Info Component
symfony/routing              v4.2.2  v4.2.2  Symfony Routing Component
symfony/security-acl         v3.0.1  v3.0.1  Symfony Security Component - ACL (Access Control List)
symfony/security-bundle      v4.2.2  v4.2.2  Symfony SecurityBundle
symfony/security-core        v4.2.2  v4.2.2  Symfony Security Component - Core Library
symfony/security-csrf        v4.2.2  v4.2.2  Symfony Security Component - CSRF Library
symfony/security-guard       v4.2.2  v4.2.2  Symfony Security Component - Guard
symfony/security-http        v4.2.2  v4.2.2  Symfony Security Component - HTTP Integration
symfony/serializer           v4.2.2  v4.2.2  Symfony Serializer Component
symfony/serializer-pack      v1.0.2  v1.0.2  A pack for the Symfony serializer
symfony/stopwatch            v4.2.2  v4.2.2  Symfony Stopwatch Component
symfony/swiftmailer-bundle   v3.2.5  v3.2.5  Symfony SwiftmailerBundle
symfony/templating           v4.2.2  v4.2.2  Symfony Templating Component
symfony/test-pack            v1.0.5  v1.0.5  A pack for functional and end-to-end testing within a Symfony app
symfony/translation          v4.2.2  v4.2.2  Symfony Translation Component
symfony/twig-bridge          v4.2.2  v4.2.2  Symfony Twig Bridge
symfony/twig-bundle          v4.2.2  v4.2.2  Symfony TwigBundle
symfony/validator            v4.2.2  v4.2.2  Symfony Validator Component
symfony/var-dumper           v4.2.2  v4.2.2  Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter         v4.2.2  v4.2.2  A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/web-link             v4.2.2  v4.2.2  Symfony WebLink Component
symfony/web-profiler-bundle  v4.2.2  v4.2.2  Symfony WebProfilerBundle
symfony/web-server-bundle    v4.2.2  v4.2.2  Symfony WebServerBundle
symfony/yaml                 v4.2.2  v4.2.2  Symfony Yaml Component

### PHP version

$ php -v


PHP 7.1.25-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Dec  7 2018 08:15:15) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.25-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

## Subject
When I install SonataMediaBundle I have eroors when clearing cach

## Steps to reproduce
Just run composer require sonata-project/media-bundle:3.17.0

## Actual results
`Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In FileLocator.php line 71:
!!                                                                                 
!!    The file "api_form_no_driver.xml" does not exist (in: /*****/ve  
!!    ndor/sonata-project/media-bundle/src/DependencyInjection/../Resources/confi  
!!    g).                                                                          
!!                                                                                 
!!  
!!  
Script @auto-scripts was called via post-install-cmd
`
simonberton commented 5 years ago

Same here on a LAMP with php 7.2. Symfony 4.2 and Sonata Admin " The file "api_form_no_driver.xml" does not exist (in: /var/www/app/vendor/sonata-project/media-bundle/src/DependencyInjection/../Resources/config). "

simonberton commented 5 years ago

For now I've made it work, making an empty api_form_no_driver.xml under:

vendor/sonata-project/media-bundle/src/Resources/config

`<?xml version="1.0" encoding="UTF-8"?>

`
greg0ire commented 5 years ago

@simonberton fresh install too, or did you upgrade?

simonberton commented 5 years ago

Fresh install. Removed this bundle and used the vich uploaded instead

quisse commented 5 years ago

One has to choose a db_driver:

# config/packages/sonata.yaml

sonata_media:
    db_driver: doctrine_orm # or doctrine_mongodb, doctrine_phpcr it is mandatory to choose one here
stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.