This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Install Sonata News Bundle

Discuss Symfony 2 bundles here

Install Sonata News Bundle

by tonyevyght » Fri May 11, 2012 11:42 am

I learn Symfony 2. I would like have example with SonataAdminBundle. I found:

http://sonata-project.org/bundles/news/ ... ation.html

but this haven't first point.
i found:

Code: Select all
    [SonataAdminBundle]
        git=http://github.com/sonata-project/SonataAdminBundle.git
        target=/bundles/Sonata/AdminBundle
     
    [SonataBlockBundle]
        git=http://github.com/sonata-project/SonataBlockBundle.git
        target=/bundles/Sonata/BlockBundle
     
    [SonataCacheBundle]
        git=http://github.com/sonata-project/SonataCacheBundle.git
        target=/bundles/Sonata/CacheBundle
     
    [SonatajQueryBundle]
        git=http://github.com/sonata-project/SonatajQueryBundle.git
        target=/bundles/Sonata/jQueryBundle
     
    [SonataDoctrineORMAdminBundle]
        git=http://github.com/sonata-project/SonataDoctrineORMAdminBundle.git
        target=/bundles/Sonata/DoctrineORMAdminBundle
     
    [KnpMenuBundle]
        git=http://github.com/KnpLabs/KnpMenuBundle.git
        target=/bundles/Knp/Bundle/MenuBundle
     
    [KnpMenu]
        git=http://github.com/KnpLabs/KnpMenu.git
        target=/knp/menu
     
    [Exporter]
        git=http://github.com/sonata-project/exporter.git
        target=/exporter
   
    [SonataNewsBundle]
        git=http://github.com/sonata-project/SonataNewsBundle.git
        target=/bundles/Sonata/NewsBundle


and run **bin/install vendors.** . Install is correct. Id added line to AppKernel and autoload, and if i run:

Code: Select all
    php app/console sonata:easy-extends:generate SonataNewsBundle


i have error:

[InvalidArgumentException]
Bundle "ApplicationSonataNewsBundle" does not exist or it is not enabled.


So i added:

Code: Select all
    new Application\Sonata\NewsBundle\ApplicationSonataNewsBundle(),


and run

Code: Select all
    php app/console sonata:easy-extends:generate SonataNewsBundl


then i have error:
PHP Fatal error: Class
'Application\Sonata\NewsBundle\ApplicationSonataNewsBundle' not found in /home/lanox06/Projects/sym2/app/AppKernel.php on line 29


How can i make this? I would like testing these application. Where is good working example? Thanks
tonyevyght
Junior Member
 
Posts: 1
Joined: Fri May 11, 2012 11:39 am

Re: Install Sonata News Bundle

by cured » Thu Jul 12, 2012 1:55 am

Hi
you should follow these manuals
http://sonata-project.org/bundles/media ... ation.html

news bundle should be installed the same way
1) git
2) add namespaces and classes
3) configure bundle
4) and only now make easy-extends command
5) configure application bundle

hope this will help if the problem still exists
cured
Junior Member
 
Posts: 1
Joined: Thu Jul 12, 2012 1:49 am

Re: Install Sonata News Bundle

by jfgrissom » Sun Jan 11, 2015 2:04 pm

Whew!

I just finished installing Sonata-Everything simply to get a blog up... (mostly just to have sonata news).

Wow... very painful. A LOT of work to simply put up a blog... but it sure beats struggling with getting wordpress to behave the way you want it to!

I thought:
It's 2014 and this thread is old, so I'll point out that it IS possible to setup SonataNews/User/Media/Classification with the existing documentation and some googling.

Keep your chin up if you're having a hard time with this.

I'll try to post a step by step in the next week or so (I'm sure I'll need to install this again so I'm thinking it would be good to document it here.)

Good to see you guys!
Take it easy!
The Principle Of Antagonism:
A protagonist and his story can only be as intellectually fascinating and emotionally compelling as the forces of antagonism make him.
---Robert McKee
http://jfgrissom.wordpress.com
User avatar
jfgrissom
Faithful Member
 
Posts: 228
Joined: Tue Jan 25, 2011 7:24 pm
Location: San Diego