symfony-cmf / simple-cms-bundle

UNMAINTAINED - A more-than-simple cms based on the cmf components
http://cmf.symfony.com/
49 stars 45 forks source link

ParameterNotFoundException: The service "symfony_cmf_block.simple_admin" has a dependency on a non-existent parameter "symfony_cmf_content.content_basepath". #27

Closed gchokeen closed 11 years ago

gchokeen commented 11 years ago

HI, Everything was working fine before update. To install JMSPaymentCoreBundle, I just run php composer.phar update command. After that I got below error.

ParameterNotFoundException: The service "symfony_cmf_block.simple_admin" has a dependency on a non-existent parameter "symfony_cmf_content.content_basepath".

While update:

 - Removing symfony/symfony (v2.1.4)
  - Installing symfony/symfony (v2.1.6)
    Downloading: 100%         

  - Removing symfony/swiftmailer-bundle (v2.1.0)
  - Installing symfony/swiftmailer-bundle (v2.1.5)
    Downloading: 100%         

  - Removing symfony/monolog-bundle (v2.1.0)
  - Installing symfony/monolog-bundle (v2.1.5)
    Downloading: 100%         

  - Removing sensio/distribution-bundle (v2.1.4)
  - Installing sensio/distribution-bundle (v2.1.5)
    Downloading: 100%         

  - Removing sensio/framework-extra-bundle (v2.1.4)
  - Installing sensio/framework-extra-bundle (v2.1.5)
    Downloading: 100%         

  - Removing sensio/generator-bundle (v2.1.4)
  - Installing sensio/generator-bundle (v2.1.5)
    Downloading: 100%         

  - Removing friendsofsymfony/user-bundle (v1.3.0)
  - Installing friendsofsymfony/user-bundle (v1.3.1)
    Downloading: 100%         

  - Installing jms/payment-core-bundle (dev-master 6f71468)
    Cloning 6f714685f2520a2c57f910f4589328ddb3a34f2c

  - Updating symfony-cmf/core-bundle dev-master (93b54c5 => 08a153b)
    Checking out 08a153b3245f653881d81eb0d2a439314828cd98

  - Updating symfony-cmf/content-bundle dev-master (187d968 => 60b7193)
    Checking out 60b719359903b7f3cbe5fba6d54be815104c4ba0

  - Updating symfony-cmf/menu-bundle dev-master (547c5fc => 4d8a1b8)
    Checking out 4d8a1b871194739e15bdb9f591957b82127ecfae

  - Updating sonata-project/block-bundle dev-master (60b12fd => 92b2bfd)
    Checking out 92b2bfd445bc83a0fa7149ef760fa0d0f2587845

  - Updating symfony-cmf/block-bundle dev-master (f3d5ffe => 423e624)
    Checking out 423e6246f6489e42607c816c6d924de937e8a599

  - Updating friendsofsymfony/jsrouting-bundle dev-master (f72dc53 => 49449cd)
    Checking out 49449cd5ecde0254fdc554068fe8c87470b1057d

  - Updating symfony-cmf/tree-browser-bundle dev-master (a489099 => 2e3ed42)
    Checking out 2e3ed42be270463dd10b9909043a128fda0f0a49

  - Updating symfony-cmf/symfony-cmf dev-master (09b8fba => 424e81a)
    Checking out 424e81a41567fad95e38d0560154b36ce39a3c02

  - Updating jms/di-extra-bundle dev-master (d9a18c6 => aff6f3d)
    Checking out aff6f3da3c866ef06d13e7c9043e1253f11932a0

  - Updating phpcollection/phpcollection dev-master (0.10.0 => 360a888)
    Checking out 360a888f246773e660fce0d175cf62e41f50dd22

  - Updating jms/serializer dev-master (160cad9 => 00d1055)
    Checking out 00d10555138e2ae7a807b83b802605983f255000

  - Updating friendsofsymfony/rest-bundle dev-master (d1b3fcf => 9991dbc)
    Checking out 9991dbc36d16dcf5bf79f0c2decc2435d753008e

  - Updating midgard/createphp dev-master (db19f76 => 1e4be01)
    Checking out 1e4be013e94915304d17401fb0c85e924e8799de

  - Updating sonata-project/admin-bundle dev-master (4dab673 => 9b470e2)
    Checking out 9b470e2782b72377565af912274fbc4601847a8c

  - Updating sonata-project/doctrine-phpcr-admin-bundle dev-master (99fa387 => b6da786)
    Checking out b6da7860c0dd0f7bec9ba5ba3b2a0408bcd7766c

  - Updating sonata-project/cache-bundle dev-master (d4060e0 => 2d8e5f6)
    Checking out 2d8e5f615bcfa3679f7e438c3250fcb1f82e5281

  - Updating jackalope/jackalope-doctrine-dbal dev-master (f5b23c1 => 596d738)
    Checking out 596d738d0016e6e0701bcc066247396032605d29

Above action was done. But at the end I received below error

  [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]                                                       
  The service "symfony_cmf_block.simple_admin" has a dependency on a non-existent parameter "symfony_cmf_content.content_basepath".

This is my config.yml.

sonata_block:
    default_contexts: [cms]
    blocks:
        sonata.admin.block.admin_list:
            contexts:   [admin]
        sonata_admin_doctrine_phpcr.tree_block:
            settings:
                id: '/cms'
            contexts:   [admin]

sonata_admin:
    templates:
        # default global templates
        ajax:    SonataAdminBundle::ajax_layout.html.twig
    dashboard:
        blocks:
            # display a dashboard block
            - { position: right, type: sonata.admin.block.admin_list }
            - { position: left, type: sonata_admin_doctrine_phpcr.tree_block }

sonata_doctrine_phpcr_admin:
    document_tree:
        Doctrine\PHPCR\Odm\Document\Generic:
            valid_children:
                - all
        Symfony\Cmf\Bundle\SimpleCmsBundle\Document\Page: ~
        Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route:
            valid_children:
                - Symfony\Cmf\Bundle\RoutingExtraBundle\Document\Route
                - Symfony\Cmf\Bundle\RoutingExtraBundle\Document\RedirectRoute
        Symfony\Cmf\Bundle\RoutingExtraBundle\Document\RedirectRoute:
            valid_children: []
        Symfony\Cmf\Bundle\MenuBundle\Document\MenuItem:
            valid_children:
                - Symfony\Cmf\Bundle\MenuBundle\Document\MenuItem
                - Symfony\Cmf\Bundle\MenuBundle\Document\MultilangMenuItem
        Symfony\Cmf\Bundle\MenuBundle\Document\MultilangMenuItem:
            valid_children:
                - Symfony\Cmf\Bundle\MenuBundle\Document\MenuItem
                - Symfony\Cmf\Bundle\MenuBundle\Document\MultilangMenuItem

fos_js_routing:
    routes_to_expose:
        - admin_sandbox_main_editablestaticcontent_create
        - admin_sandbox_main_editablestaticcontent_delete
        - admin_sandbox_main_editablestaticcontent_edit
        - admin_bundle_menu_menuitem_create
        - admin_bundle_menu_menuitem_delete
        - admin_bundle_menu_menuitem_edit
        - admin_bundle_menu_multilangmenuitem_create
        - admin_bundle_menu_multilangmenuitem_delete
        - admin_bundle_menu_multilangmenuitem_edit
        - admin_bundle_content_multilangstaticcontent_create
        - admin_bundle_content_multilangstaticcontent_delete
        - admin_bundle_content_multilangstaticcontent_edit
        - admin_bundle_routingextra_route_create
        - admin_bundle_routingextra_route_delete
        - admin_bundle_routingextra_route_edit
        - admin_bundle_simplecms_page_create
        - admin_bundle_simplecms_page_delete
        - admin_bundle_simplecms_page_edit
        - symfony_cmf_tree_browser.phpcr_children
        - symfony_cmf_tree_browser.phpcr_move
        - sonata.admin.doctrine_phpcr.phpcrodm_children
        - sonata.admin.doctrine_phpcr.phpcrodm_move

doctrine_phpcr:
    session:
        backend:
            type: doctrinedbal
            connection: doctrine.dbal.default_connection
        workspace: default
        username: admin
        password: admin
    odm:
        auto_mapping: true

Help me to figure out the issue

lsmith77 commented 11 years ago

you opened this ticket on the wrong bundle. at any rate yes parameter is defined by the SymfonyCmfContentBundle, which is not configured as a dependency atm. i want to clean up all of these dependencies eventually by moving such stuff into the SymfonyCmfCoreBundle instead or by making sure that if the bundle defining the given parameter isnt loaded we define a fallback.

lsmith77 commented 11 years ago

i have fixed the issue in the BlockBundle for now https://github.com/symfony-cmf/BlockBundle/commit/00feebac4da56566c166f7557794d379204b7ea7

in the long run it would be cool to handle settings that should in most cases be set to the same values via this new feature: https://github.com/symfony/symfony-docs/pull/2007

gchokeen commented 11 years ago

Sorry For asked question in wrong bundle, yes I found the configuration file in vendor/symfony-cmf/block-bundle/Symfony/Cmf/Bundle/BlockBundle/Resources/config/admin.xml.

Your commit link is broken. Can you update the correct link to resolve the issue.

lsmith77 commented 11 years ago

I have corrected the link.

gchokeen commented 11 years ago

This is great fix !. I am still getting another error.

ServiceNotFoundException: The service "symfony_cmf_block.simple_admin" has a dependency on a non-existent service "knp_menu.factory".
lsmith77 commented 11 years ago

you need to also enable this bundle: http://symfony.com/doc/master/cmf/bundles/menu.html

it should already be installed, because there is a hard dependency from simple cms bundle on the menu bundle.

gchokeen commented 11 years ago

You was one hundred percent true.

           new Knp\Bundle\MenuBundle\KnpMenuBundle(),
           new Symfony\Cmf\Bundle\MenuBundle\SymfonyCmfMenuBundle(), 

Solved thanks