Sylius: Cant' load sample data

Created on 15 Apr 2016  Â·  12Comments  Â·  Source: Sylius/Sylius

Hi,

I'm trying to load sample data on a clean install of sylius but im getting this error:

php app/console sylius:install

Installing Sylius...

Step 1 of 4. Checking system requirements.
+--------------------+----------------+
| Issue              | Recommendation |
+--------------------+----------------+
| short_open_tag     |                |
| session.auto_start |                |
+--------------------+----------------+
Success! Your system can run Sylius properly.

Step 2 of 4. Setting up the database.
Creating Sylius database for environment dev.
It appears that your database already exists. Would you like to reset it? (y/N) y
 8/8 [||||||||||||||||||||||||||||] 100%Warning! This will erase your database. Your current environment is dev.
Load sample data? (y/N) y
Loading sample data...
 0/3 [|                           ]   0%

  [OutOfBoundsException]                                   
  Reference to: (Sylius.Taxonomy.Category) does not exist  

It's maybe any configuration?

Potential Bug

All 12 comments

Have you tried with the newest master? Are you using sylius-sylius(this repo) or sylius-standard?

I don't have any troubles to load sample data
zrzut ekranu 2016-04-15 o 13 06 27

@lchrusciel Im using sylius-standard, how i update to the newest master?

@xavilondo change dependency in composer.json from "sylius/sylius": "0.17.*@dev", to "sylius/sylius": "0.18.*@dev", and update composer.

I updated the dependencies but the error persists.

After a few tries with a clean install with this repo and the standard i detected the bug:

I can't install with this parameter:

sylius.locale (en_US): es_ES

With the default value i can install it without problems.

Seems i had something same as @xavilondo

After updating Sylius to latest version, I get this error when running sylius:install:
`Step 2 of 4. Setting up the database.
Creating Sylius database for environment dev.
3/4 [|||||||||||||||||9
4/4 [|||||||||||||||||9
4/4 [|||||||||||||||||9
m|||||||||||] 100%
Step 3 of 4. Shop configuration.
Please enter a currency code (For example "GBP") or press ENTER to use "USD".
In which currency can your customers buy goods?
Adding dollaro statunitense

[RuntimeException]
Listener "SoftDeleteableListener" was not added to the EventManager!

sylius:install:setup [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug
] [--] `

Is this a bug due to the latest commits?
Can this be solved with some configuration in the "config.yml" file?

@RobertLangore can't reproduce that with the newest master, maybe try to clear cache.

@michalmarcinkowski Still got the error even after clearing the cache.

From a clean install:

  1. composer create-project -s dev sylius/sylius-standard sylius-v018
  2. sf cache:clear --no-warmup
  3. change "sylius/sylius": "0.17._@dev" to "sylius/sylius": "0.18._@dev" in composer.json
  4. composer update
  5. sf cache:clear --no-warmup
  6. sf sylius:install
    then i get exact same error
  7. sf is an alias of "php app/console"

Solved. After the clean install and updating to sylius v0.18 my app/config/config.yml was not updated. I had to remove the "filters" in the doctrine configuration:

doctrine:
orm:
auto_generate_proxy_classes: "%kernel.debug%"
entity_managers:
default:
auto_mapping: true
mappings:
gedmo_loggable:
type: annotation
prefix: Gedmo\Loggable\Entity
dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Entity"
is_bundle: false
** filters:
softdeleteable:
class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
enabled: true
** dql:
string_functions:
MATCH: Sylius\Bundle\SearchBundle\Extension\Doctrine\MatchAgainstFunction

I updated the app/config/config.yml in sylius/sylius-standart with the content of the same file in sylius/sylius (after changing the versione from 0.17 in 0.18: as in the previous comment).
@michalmarcinkowski Are there other files to update?

@xavilondo The same can work for you.

Take a look at https://github.com/Sylius/Sylius-Standard/pull/91. I have updated the outdated configuration files on Sylius-Standard.

@michalmarcinkowski Thanks.
After updating the files throught git, I got the "Doctrine is not available." error: I solved it with the solution proposed here #4716 (it should be related to the modifications made in symfony-cmf/core-bundle).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eb22fbb4 picture eb22fbb4  Â·  3Comments

loic425 picture loic425  Â·  3Comments

tchapi picture tchapi  Â·  3Comments

Chrysweel picture Chrysweel  Â·  3Comments

loic425 picture loic425  Â·  3Comments