Could you please help me with "Symfony\Compon ent\DependencyI njection\Except ion\ParameterNo tFoundException " . You have requested a non-existent parameter "Could not determine the Doctrine manager. Either Doctrine is not configured or a bundle is misconfigured. ".
I am installing and configuring the CMF Core Bundles:
http://symfony.com/doc/current/cmf/cookbook/editions/cmf_core.html
and phpcr_odm bunde:
http://symfony.com/doc/current/cmf/bundles/phpcr_odm/introduction.ht ml
I made all steps in given webpages.
*************** **********
I was getting ERROR 1 (resolved):
php app/console doctrine:databa se:create
c:\Bitnami\wamp stack-5.4.38-0\sym_prog\Knp> php app/console doctrine:databa se:create
[Symfony\Compone nt\Config\Defin ition\Exception \InvalidConfigu rationException]
The child node "default_contex ts" at path "sonata_blo ck" must be configured
SOLUTION:
https://sonata-project.org/bundles/block/master/doc/reference/installation.ht ml
added
*****
Now i am getting ERROR 2 (could you please HELP):
c:\Bitnami\wamp stack-5.4.38-0\sym_prog\Knp> php app/console doctrine:databa se:create
[Symfony\Compone nt\DependencyIn jection\Excepti on\ParameterNot FoundException]
You have requested a non-existent parameter "Could not determine the Doctrine manager. Either Doctrine is not configured or a bundle is misconfigured. ".
C:\Bitnami\wamp stack-5.4.38-0\sym_prog\Knp\ app\config\conf ig.yml
C:\Bitnami\wamp stack-5.4.38-0\sym_prog\Knp\ app\AppKernel.p hp
C:\Bitnami\wamp stack-5.4.38-0\sym_prog\Knp\ composer.json
I am installing and configuring the CMF Core Bundles:
http://symfony.com/doc/current/cmf/cookbook/editions/cmf_core.html
and phpcr_odm bunde:
http://symfony.com/doc/current/cmf/bundles/phpcr_odm/introduction.ht ml
I made all steps in given webpages.
*************** **********
I was getting ERROR 1 (resolved):
php app/console doctrine:databa se:create
c:\Bitnami\wamp stack-5.4.38-0\sym_prog\Knp> php app/console doctrine:databa se:create
[Symfony\Compone nt\Config\Defin ition\Exception \InvalidConfigu rationException]
The child node "default_contex ts" at path "sonata_blo ck" must be configured
SOLUTION:
https://sonata-project.org/bundles/block/master/doc/reference/installation.ht ml
added
Code:
# app/config/config.yml
sonata_block:
default_contexts: [sonata_page_bundle]
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
#sonata.admin_doctrine_orm.block.audit:
# contexts: [admin]
sonata.block.service.text:
sonata.block.service.rss:
# Some specific block from the SonataMediaBundle
#sonata.media.block.media:
#sonata.media.block.gallery:
#sonata.media.block.feature_media:
Now i am getting ERROR 2 (could you please HELP):
c:\Bitnami\wamp stack-5.4.38-0\sym_prog\Knp> php app/console doctrine:databa se:create
[Symfony\Compone nt\DependencyIn jection\Excepti on\ParameterNot FoundException]
You have requested a non-existent parameter "Could not determine the Doctrine manager. Either Doctrine is not configured or a bundle is misconfigured. ".
C:\Bitnami\wamp stack-5.4.38-0\sym_prog\Knp\ app\config\conf ig.yml
Code:
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }
# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
locale: en
framework:
#esi: ~
#translator: { fallbacks: ["%locale%"] }
secret: "%secret%"
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
#serializer: { enable_annotations: true }
templating:
engines: ['twig']
#assets_version: SomeVersionScheme
default_locale: "%locale%"
trusted_hosts: ~
trusted_proxies: ~
session:
# handler_id set to null will use default session handler from php.ini
handler_id: ~
fragments: ~
http_method_override: true
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
# Assetic Configuration
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: [ ]
#java: /usr/bin/java
filters:
cssrewrite: ~
#closure:
# jar: "%kernel.root_dir%/Resources/java/compiler.jar"
#yui_css:
# jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
# Doctrine Configuration
doctrine:
dbal:
driver: pdo_mysql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
# path: "%database_path%"
orm:
auto_generate_proxy_classes: "%kernel.debug%"
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
spool: { type: memory }
knp_menu:
twig: true
cmf_core:
persistence:
phpcr:
enabled: true
doctrine_phpcr:
session:
backend:
type: doctrinedbal
# connection: default
# requires DoctrineCacheBundle
# caches:
# meta: doctrine_cache.providers.phpcr_meta
# nodes: doctrine_cache.providers.phpcr_nodes
# enable logging
logging: true
# enable profiling in the debug toolbar.
profiling: true
workspace: default
username: admin
password: admin
# https://sonata-project.org/bundles/block/master/doc/reference/installation.html
sonata_block:
default_contexts: [sonata_page_bundle]
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
#sonata.admin_doctrine_orm.block.audit:
# contexts: [admin]
sonata.block.service.text:
sonata.block.service.rss:
# Some specific block from the SonataMediaBundle
#sonata.media.block.media:
#sonata.media.block.gallery:
#sonata.media.block.feature_media:
C:\Bitnami\wamp stack-5.4.38-0\sym_prog\Knp\ app\AppKernel.p hp
Code:
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new AppBundle\AppBundle(),
new Knp\IpsumBundle\KnpIpsumBundle(),
// CMF bundles
new Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle(),
new Symfony\Cmf\Bundle\CoreBundle\CmfCoreBundle(),
new Symfony\Cmf\Bundle\MenuBundle\CmfMenuBundle(),
new Symfony\Cmf\Bundle\ContentBundle\CmfContentBundle(),
new Symfony\Cmf\Bundle\BlockBundle\CmfBlockBundle(),
// Dependencies of the CmfMenuBundle
new Knp\Bundle\MenuBundle\KnpMenuBundle(),
// Dependencies of the CmfBlockBundle
new Sonata\CoreBundle\SonataCoreBundle(),
new Sonata\BlockBundle\SonataBlockBundle(),
// PHPCRBundle
new Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle(),
// sefined up new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
}
}
C:\Bitnami\wamp stack-5.4.38-0\sym_prog\Knp\ composer.json
Code:
{
"name": "gintare/knp",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
}
},
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"symfony-cmf/symfony-cmf": "1.2.*",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"jackalope/jackalope-doctrine-dbal": "1.2.*",
"doctrine/phpcr-odm": "1.2.*",
"doctrine/phpcr-bundle": "1.2.*"
},
"require-dev": {
"sensio/generator-bundle": "~2.3"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}
Comment