安装错误:覆盖 Akeneo ProductController

Installation errors: Overwrite Akeneo ProductController

我想从 EnrichBundle 覆盖 ProductController

在开发模式下一切正常,但是当我想使用 php app/console pim:install --env=prod --force 在我们的生产服务器上安装它时,出现错误并且 Akeneo 不工作:

Load "Title Templates" from annotations and config files to db
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Title for route "pim_enrich_attributegroup_index" could not be saved. Route not found.

oro:navigation:init
The command terminated with an error code: 1.

如果我取消注释 MyEnrichBundle 中的 getParent() 方法,安装工作正常,但我的 ProductController 不再工作。

class MyEnrichBundle extends Bundle
{

    public function getParent()
    {
        return 'PimEnrichBundle';
    }

}

如何避免这些 ORO 安装错误?

我们最近在当前开发分支上更改了这个路由键,所以你的问题似乎与此有关。我建议您只使用 PIM 的标记版本(最新发布的版本 here)以确保安装稳定。

另一个重要信息:在生产环境 (-e=prod) 和开发环境 (-e=dev) 中安装的唯一区别是缓存预热。因此,您可以安全地将 PIM 安装在 dev mode 中的生产服务器上,然后在生产中使用它。

为了解决您的问题,我建议您使用 composer 更新您的依赖项(如果您使用我们的企业版):

php composer.phar update

之后您可以使用

手动清除缓存

rm -rf ./app/cache/*

然后在开发中安装Akeneo PIM mod:

php app/console pim:install --force -e=dev