【问题标题】:Installation errors: Overwrite Akeneo ProductController安装错误:覆盖 Akeneo ProductController
【发布时间】:2015-07-27 07:15:11
【问题描述】:

我想从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 安装错误?

【问题讨论】:

  • 您能否解释一下从 EnrichBundle (/Pim/Bundle/EnrichBundle/Controller/Rest/productController) 覆盖 productController 的步骤?

标签: php symfony akeneo


【解决方案1】:

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

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

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

php composer.phar update

之后你可以手动清除缓存

rm -rf ./app/cache/*

然后在 dev mod 中安装 Akeneo PIM:

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

【讨论】:

  • 感谢您提供这些有用的信息,我将接受它作为答案。虽然经过数小时的调试后,我意识到我的问题是别的:在将MyEnrichBundle 中的文件Resources/config/routing.yml 重命名为routing2.yml(并修复我在app/config/routing 中的引用)后,安装错误消失了。作为 Symfony/Akeneo 的初学者,我不知道为什么,但我很高兴现在一切正常 :-)。
猜你喜欢
  • 2020-06-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-07-22
  • 2018-05-07
  • 2021-12-15
  • 2017-05-27
相关资源
最近更新 更多