sonata-project / sandbox

[Abandoned] Sonata Project's sandbox
https://sonata-project.org
MIT License
268 stars 198 forks source link

Error when executing bin/load_data.php #587

Closed StephanePate closed 8 years ago

StephanePate commented 8 years ago

Executing : php ./app/console doctrine:database:drop --force Dropped database for connection named sonata_sandbox

Executing : php ./app/console doctrine:database:create Created database sonata_sandbox for connection named default

Executing : php ./app/console doctrine:schema:update --force Updating database schema... Database schema updated successfully! "134" queries were executed

Executing : php -d memory_limit=1024M -d max_execution_time=600 ./app/console doctrine:fixtures:load --verbose --env=dev --no-debug

purging database loading [1] Sonata\Bundle\DemoBundle\DataFixtures\ORM\LoadUserData loading [2] Sonata\Bundle\DemoBundle\DataFixtures\ORM\LoadMediaData

[Doctrine\ORM\Query\QueryException]
[Semantical Error] line 0, col 80 near 'parent IS NU': Error: Class Application\Sonata\ClassificationBundle\Entity\Category has no field or association named parent

For info, composer.json (workable and updatable configuration, no "Your requirements could not be resolved to an installable set of packages"):

click to see composer.json ``` { "name" : "sonata-project/sandbox", "description" : "Sonata Project's sandbox (with ecommerce bundles)", "license" : "MIT", "autoload" : { "psr-0" : { "" : "src/" } }, "minimum-stability" : "stable", "require" : { "php" : ">=5.3.3", "dflydev/markdown" : "~1.0", "doctrine/data-fixtures" : "1.1.1", "doctrine/dbal" : "~2.4,<2.5", "doctrine/doctrine-bundle" : "~1.5", "doctrine/doctrine-fixtures-bundle" : "~2.3.0", "doctrine/doctrine-migrations-bundle" : "*@dev", "doctrine/migrations" : "~1.0@dev", "doctrine/orm" : "~2.4,<2.5", "friendsofsymfony/comment-bundle" : "~2.0@dev", "incenteev/composer-parameter-handler" : "~2.0", "jms/serializer-bundle" : "~0.11", "knplabs/gaufrette" : "~0.1.6", "knplabs/knp-menu-bundle" : "dev-master", "mopa/bootstrap-bundle" : "v3.0.0-beta3", "nelmio/api-doc-bundle" : "dev-master", "sensio/distribution-bundle" : "~4.0", "sensio/framework-extra-bundle" : "^3.0.2", "simplethings/entity-audit-bundle" : "~0.5", "sonata-project/admin-bundle" : "~3.4", "sonata-project/block-bundle" : "~3.1", "sonata-project/cache" : "~1.0", "sonata-project/cache-bundle" : "~2.2", "sonata-project/classification-bundle" : "~3.1", "sonata-project/comment-bundle" : "~3.0", "sonata-project/core-bundle" : "~3.0", "sonata-project/datagrid-bundle" : "~2.2", "sonata-project/doctrine-extensions" : "~1", "sonata-project/doctrine-orm-admin-bundle" : "~3.0", "sonata-project/easy-extends-bundle" : "~2.1", "sonata-project/ecommerce" : "2.x-dev", "sonata-project/exporter" : "~1.7", "sonata-project/formatter-bundle" : "~3.0", "sonata-project/intl-bundle" : "~2.2", "sonata-project/media-bundle" : "~3.2", "sonata-project/news-bundle" : "3.x-dev", "sonata-project/notification-bundle" : "~3.0", "sonata-project/page-bundle" : "3.x-dev", "sonata-project/seo-bundle" : "~2.0", "sonata-project/sonata-composer" : "dev-master", "sonata-project/timeline-bundle" : "~3.0", "sonata-project/user-bundle" : "~3.0", "stephpy/timeline-bundle" : "~2.0", "stof/doctrine-extensions-bundle" : "~1.1", "symfony-cmf/routing-bundle" : "~1.1", "symfony/assetic-bundle" : "~2.3", "symfony/monolog-bundle" : "~2.3", "symfony/swiftmailer-bundle" : "~2.3", "symfony/symfony" : "~2.7,>=2.7.2", "twbs/bootstrap" : "v3.0.0", "twig/extensions" : "~1.0", "twig/twig" : "^1.24", "willdurand/faker-bundle" : "~1.0" }, "require-dev" : { "behat/behat" : "~2.4", "behat/common-contexts" : "1.2.*@dev", "behat/mink" : "~1.5", "behat/mink-browserkit-driver" : "~1.1", "behat/mink-extension" : "~1.2", "behat/mink-goutte-driver" : "~1.0", "behat/mink-selenium2-driver" : "~1.1", "fabpot/goutte" : "~1.0", "guzzle/guzzle" : "~3.0", "jms/di-extra-bundle" : "^1.7", "matthiasnoback/symfony-config-test" : "~0.4", "matthiasnoback/symfony-dependency-injection-test" : "~0.7", "phpunit/phpunit" : "~4.2", "sensio/generator-bundle" : "~2.4", "symfony/phpunit-bridge" : "2.7.*@dev" }, "scripts" : { "post-install-cmd" : [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Mopa\\Bundle\\BootstrapBundle\\Composer\\ScriptHandler::postInstallSymlinkTwitterBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" ], "post-update-cmd" : [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Mopa\\Bundle\\BootstrapBundle\\Composer\\ScriptHandler::postInstallSymlinkTwitterBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" ] }, "config" : { "bin-dir" : "bin", "sort-packages" : "true" }, "extra" : { "symfony-app-dir" : "app", "symfony-web-dir" : "web", "symfony-assets-install" : "symlink", "branch-alias" : { "dev-master" : "2.3.x-dev" }, "incenteev-parameters" : [{ "file" : "app/config/parameters.yml", "env-map" : { "database.driver" : "DATABASE_DRIVER", "database.host" : "DATABASE_HOST", "database.name" : "DATABASE_NAME", "database.user" : "DATABASE_USER", "database.password" : "DATABASE_PASSWORD", "mailer_transport" : "MAILER_TRANSPORT", "mailer_host" : "MAILER_HOST", "mailer_user" : "MAILER_USER", "mailer_password" : "MAILER_PASSWORD", "sonata_media.cdn.host" : "SONATA_MEDIA_CDN_HOST" } } ] } } ```
StephanePate commented 8 years ago

No classification__context table is created and no Foreign Keys for context, media and parent are created for classification_category table

OskarStark commented 8 years ago

@rande can you help?

StephanePate commented 8 years ago

You need to add: Context.php in src/Application/Sonata/ClassificationBundle/Entity Context.orm.xml in src/Application/Sonata/ClassificationBundle/Resources/config/doctrine Entity.Context.xml in src/Application/Sonata/ClassificationBundle/Resources/config/serializer To get 142 queries executed