Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In TreeListener.php line 72: Tree object class: Pim\Bundle\CatalogBundle\Entity\Category must have tree metadata at this point #801

Closed
kamranmalikawan opened this issue Jan 19, 2018 · 2 comments

Comments

@kamranmalikawan
Copy link

Hi All,

I have facing this issue when adding a new field in category using 2.1 version of Akeneo i spent lot of time on that but not able to fix please help on that.

Thanks,

@tamarasaurus
Copy link
Contributor

Hi @kamranmalikawan, for bugs with the pim, you can create an issue at https://github.com/akeneo/pim-community-dev/issues instead.

Regards,
Tamara

@karthik32cse
Copy link

karthik32cse commented Dec 27, 2018

Solution:

The above issue is occured due to the DependencyInjection. In order to fix this issue follow the below instructions,

Creating an Extension Class:

  1. It has to live in the DependencyInjection namespace of the bundle;
  2. It has to implement the ExtensionInterface, which is usually achieved by extending the Extension class;
  3. The name is equal to the bundle name with the Bundle suffix replaced by Extension (e.g. the Extension class of the AcmeBundle would be called AcmeExtension and the one for AcmeCatalogBundle would be called AcmeCatalogExtension).

Code:

# /src/Acme/Bundle/CatalogBundle/DependencyInjection/AcmeCatalogExtension.php
`<?php

namespace Acme\Bundle\CatalogBundle\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

class AcmeCatalogExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
{
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('entities.yml');
}
}`

Let me know if you have any questions

Regards,
Karthik Dhakshinamoorthy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants