0
votes

I just wanted to use the Classification Bundle from Sonata (http://sonata-project.org/bundles/classification/2-2/doc/index.html).

Everything worked out great until I entered the admin panel, added a category and tried to view the list. Then the error came out:

Undefined index: parent in vendor/sonata-project/doctrine-orm-admin-bundle/Guesser/FilterTypeGuesser.php line 64

It seems like there is a bug posted on GitHub: https://github.com/sonata-project/SonataClassificationBundle/issues/40

Anyways I need some kind of solution as I need it working ASAP. Any ideas guys?

1

1 Answers

0
votes

Try to manually insert root category into the database.

Here is sql:

INSERT INTO `classification__category` (`id`, `parent_id`, `context`, `name`, `enabled`, `slug`, `description`, `position`, `created_at`, `updated_at`, `media_id`) VALUES (1, NULL, 'main', 'Root', 1, 'root', NULL, 1, NOW(), NOW(), NULL);