sonata-project / SonataMediaBundle

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

Outdated doc #1083

Closed mysterty closed 8 years ago

mysterty commented 8 years ago

Hello, i'm trying to install the media bundle on my project, but i'm afraid that the documentation is outdated ("app/console" instead of "bin/console"). And so i encounter errors. I follow the doc and when i run php bin/console sonata:easy-extends:generate --dest=src SonataMediaBundle, i have that error : [Symfony\Component\Config\Exception\FileLoaderLoadException] There is no extension able to load the configuration for "sonata_media"

If i remove the config, then i have the error : The bundle 'SonataMediaBundle' does not exist or not defined in the kernel file!

greg0ire commented 8 years ago

Did you register the bundle in the kernel of your application?

mysterty commented 8 years ago

I tried many different solutions, but none of them works...

greg0ire commented 8 years ago

But did you register the bundle in the kernel of your application?

core23 commented 8 years ago

This looks like a config problem and no general issue

mysterty commented 8 years ago

@greg0ire : yes i registered it in kernel. I tried also without registering it. @core23 : It's maybe (and probably) a configuration problem, but it's exactly what i say : your doc is OUTDATED : https://sonata-project.org/bundles/media/2-2/doc/reference/installation.html What is the good configuration ? what is the correct installation process ?

greg0ire commented 8 years ago

yes i registered it in kernel

Prove it. This message says clearly otherwise :

The bundle 'SonataMediaBundle' does not exist or not defined in the kernel file!

mysterty commented 8 years ago

@greg0ire : maybe cause the documentation clearly ask to don't download the bundle : php composer.phar require sonata-project/media-bundle --no-update

greg0ire commented 8 years ago

The documentation says to not download it, because there is no point in downloading bundles one by one. You require them, and then you download all of them in one go.

Now I am under the impression that you have no idea what this means :

Did you register the bundle in the kernel of your application?

Otherwise you would have shown us your application kernel.

mysterty commented 8 years ago

As i say, i follow YOUR documentation, so in my app kernel, there is :

<?php
// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Sonata\CoreBundle\SonataCoreBundle(),
        new Sonata\MediaBundle\SonataMediaBundle(),
        new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(),
        // ...
    );
}

Happy now ? Can we go on the true problem ? THE DOCUMENTATION IS WRONG AND OUTDATED.

greg0ire commented 8 years ago

So you're saying you did not download the bundle, but registered it in your kernel anyway? Wouldn't you get a class not found exception in that case ? Did you or did you not download the bundle?

greg0ire commented 8 years ago

Also, you're looking at version 2.2 of the documentation, and the branch 2.x is no longer supported. Please follow the master version, which is not wrong nor outdated.

mysterty commented 8 years ago

When i strictly follow the documentation, i don't download the bundle. When i download the bundle, i have other errors. Actually, i have :

[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]                                                                                 
  Unable to parse file "myproject/vendor/sonata-project/media-bundle/DependencyInjection/../Resources/config/gaufrette.xml".
mysterty commented 8 years ago

Ok, i didn't see. I follow the link to the documentation given by git : https://github.com/sonata-project/SonataMediaBundle.

I will see the master one.

greg0ire commented 8 years ago

When i strictly follow the documentation, i don't download the bundle.

As you said, the documentation is wrong and outdated. Follow version master.

Actually, i have : [Symfony\Component\DependencyInjection\Exception\InvalidArgumentException] Unable to parse file "myproject/vendor/sonata-project/media-bundle/DependencyInjection/../Resources/config/gaufrette.xml".

Having this error is way better than having the other one. It means the media bundle configuration is loading, so you are closer to something that works. That's basic troubleshooting.

greg0ire commented 8 years ago

I follow the link to the documentation given by git

Thanks for pointing that out, we'll change it.

greg0ire commented 8 years ago

It's fixed, thanks again.

mysterty commented 8 years ago

Thx you and the sonata team for all your work. ;)

Anyway i still have gaufrette issue, see that ticket : https://github.com/sonata-project/SonataMediaBundle/issues/987

mysterty commented 8 years ago

It misses something in the doc now : app kernel require Classification to be added new Sonata\ClassificationBundle\SonataClassificationBundle(), Need to replace call to app/console by bin/console

greg0ire commented 8 years ago

Would you kindly make PRs for both of these issues?

mysterty commented 8 years ago

done

But i found again problems when trying to install classification. I will make another ticket.