Variable "taxons" does not exist

I have a new installation of Sylius 1.6.0. (Using that version because I am trying to evaluate the plugin Brille24/SyliusCustomOptionsPlugin, which does not yet support 1.7.) I’ve installed the developer edition, running inside a Docker container that has PHP 7.2. Followed the instructions at

The admin runs and most sections work properly. The Taxon and Product sections both fail with the error message listed in the topic title. For the taxon section the error is in the _treeWithButtons.html.twig template, line 68:

{{ tree.render(taxons) }}

In the Product section it is the _treeWithoutButtons.html.twig template, line 41.

The home page also fails with the same error. That error happens in the template _horizontalMenu.html.twig, line 21

{% if taxons|length > 0 %}

The database exists and contains records that I assume were loaded from fixtures during the Sylius initial installation. The sylius_taxon table has 11 records.

I’ve had no luck trying to trace back through the controllers to see where that variable is supposed to be injected into the template variable space. Any hints where to look or what I’ve missed?

Just add to composer.json

"conflict": {
    "doctrine/inflector": "^1.4"

and run composer update doctrine/inflector

Great! Thanks very much, solved my problem.

The taxons variable needs to be changed with taxa variable. I did that for two files:

  • vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Resources/views/Taxon/_treeWithoutButtons.html.twig
  • vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Resources/views/Taxon/_treeWithButtons.html.twig