我想覆盖ProductController
来自EnrichBundle
.
在开发模式下一切正常,但是当我想使用 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.
如果我取消注释 getParent()
,安装就可以工作。 MyEnrichBundle
中的方法,但是我的ProductController
不再起作用了。
class MyEnrichBundle extends Bundle
{
public function getParent()
{
return 'PimEnrichBundle';
}
}
如何避免这些 ORO 安装错误?
最佳答案
我们最近在当前的开发分支上更改了此路由键,因此您的问题似乎与此相关。我建议您仅使用 PIM 的标记版本(最后发布的版本 here ),以确保安装稳定。
另一个重要信息:生产环境 (-e=prod
) 和开发环境 (-e=dev
) 中安装的唯一区别是缓存暖身。因此,您可以在开发模式下安全地将 PIM 安装在生产服务器上,然后在生产中使用它。
要解决您的问题,我建议您使用 Composer 更新依赖项(如果您使用我们的企业版):
php Composer.phar 更新
之后您可以使用
手动清除缓存rm -rf ./app/cache/*
然后在开发模式中安装 Akeneo PIM:
php 应用程序/控制台 pim:install --force -e=dev
关于php - 安装错误: Overwrite Akeneo ProductController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31647003/