0

1.网络接口

我根本无法使 api 工作。首先,我只对 OROCRM 而不是 oroCommerce 感兴趣,所以我的第一步是在这里采取的:https ://github.com/oroinc/crm-application/tree/master

太好了,现在我按照那个 github 上的安装链接并在这里结束:https ://doc.oroinc.com/backend/setup/dev-environment/manual-installation/crm-ce/

好的,它看起来不错并且有文档记录,但是当我到达这一部分时:https ://doc.oroinc.com/backend/setup/dev-environment/manual-installation/crm-ce/#step-3-oro-app-name -应用程序安装

作曲家链接错误:

composer create-project oro/commerce-crm-application oroapp --repository=https://satis.oroinc.com

最终安装了 OroCommerce 让我花了很多时间(如果我错了,请纠正我,它应该是oro/crm-application,也许调整文档?添加警告或其他什么?)

无论如何,因为我不想重新开始,所以我保留了那个 oro commerce 安装(v. 4.0)。但是现在,它根本不可能启用 web api。

正如这里的文档所述,我应该能够在后台激活它:https ://doc.oroinc.com/api/enabling-api-feature/

但是,这是我在后台办公室的: 在此处输入图像描述

我清除了 prod & dev 中的缓存,我也在 prod & dev 中运行了php bin/console oro:api:doc:cache:clear --env=prod命令,没有任何效果。

进程正在运行,cron 任务也在运行,我没有安装示例数据(夹具)。这是安装的composer.json:

{
  "name": "oro/commerce-crm-application",
  "description": "OroCommerce - an open-source Business to Business Commerce application.\\This package contains a sample application.",
  "license": "OSL-3.0",
  "authors": [
    {
      "name": "Oro, Inc",
      "homepage": "https://www.orocommerce.com"
    }
  ],
  "autoload": {
    "psr-4": {"": "src/"},
    "files": ["src/AppKernel.php"],
    "exclude-from-classmap": ["**/Tests/"]
  },
  "repositories": {
    "composer": {
      "type": "composer",
      "url": "https://packagist.orocrm.com"
    },
    "asset-packagist": {
      "type": "composer",
      "url": "https://asset-packagist.orocrm.com"
    }
  },
  "require": {
    "oro/crm": "4.0.*",
    "oro/platform-serialised-fields": "4.0.*",
    "oro/oauth2-server": "4.0.*",
    "oro/crm-hangouts-call-bundle": "4.0.*",
    "oro/crm-magento-embedded-contact-us": "4.0.*",
    "oro/crm-dotmailer": "4.0.*",
    "oro/crm-zendesk": "4.0.*",
    "oro/commerce": "4.0.*",
    "oro/commerce-crm": "4.0.*"
  },
  "require-dev": {
    "behat/behat": "3.4.*",
    "behat/mink": "1.7.x-dev#6d637f7",
    "behat/mink-extension": "2.3.*",
    "behat/mink-selenium2-driver": "1.*",
    "behat/symfony2-extension": "2.1.*",
    "nelmio/alice": "3.5.*",
    "theofidry/alice-data-fixtures": "1.0.*",
    "phpunit/phpunit": "7.5.*",
    "johnkary/phpunit-speedtrap": "3.0.*",
    "mybuilder/phpunit-accelerator": "dev-master",
    "squizlabs/php_codesniffer": "3.3.*",
    "phpmd/phpmd": "2.6.*",
    "sebastian/phpcpd": "4.0.*",
    "phpunit/phpcov": "5.0.*",
    "symfony/phpunit-bridge": "4.3.*",
    "friendsofphp/php-cs-fixer": "2.12.6",
    "oro/twig-inspector": "1.0.*"
  },
  "config": {
    "component-dir": "public/bundles/components",
    "bin-dir": "bin",
    "fxp-asset": {
      "enabled": false
    }
  },
  "scripts": {
    "post-install-cmd": [
      "@build-parameters",
      "@set-permissions",
      "@install-assets",
      "@set-assets-version"
    ],
    "post-update-cmd": [
      "@build-parameters",
      "@set-permissions",
      "@install-assets",
      "@set-assets-version"
    ],
    "build-parameters": [
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters"
    ],
    "set-permissions": [
      "Oro\\Bundle\\InstallerBundle\\Composer\\ScriptHandler::setPermissions"
    ],
    "install-assets": [
      "Oro\\Bundle\\InstallerBundle\\Composer\\ScriptHandler::installAssets"
    ],
    "set-assets-version": [
      "Oro\\Bundle\\InstallerBundle\\Composer\\ScriptHandler::setAssetsVersion"
    ]
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "extra": {
    "symfony-web-dir": "public",
    "symfony-var-dir": "var",
    "symfony-bin-dir": "bin",
    "symfony-tests-dir": "tests",
    "incenteev-parameters": {
      "file": "config/parameters.yml"
    }
  }
}

2. OAuth 铅

另一个问题,我在 /var 文件夹中添加了公钥和私钥,如下所述: https ://doc.oroinc.com/user/back-office/getting-started/user-menu/oauth/

但我仍然有相同的错误消息(即使在缓存:清除之后): OAuth 授权不可用,因为加密密钥配置不完整。请联系您的管理员。

请我需要帮助!

编辑 1

关于 Oauth 问题,我的问题是两个文件的名称。它没有在文档中的任何地方指定,我实际上找到了查看 bitnami 代码的答案,这两个文件应该命名为:

  • oauth_private.key
  • oauth_public.key
4

1 回答 1

0

Oro 商业安装 (v. 4.0)。

您使用的是 4.0 版本,但浏览 4.1 版本的文档。在 4.0 中没有这样的选项,并且始终启用 API。4.0 版本没有文档,因为它是不受支持的预览版本。考虑升级,或者如果是新安装,最好重新安装普通的CRM

作曲家链接错误

是的,您是对的,我们会修复它,感谢您的关注。目前,您可以按照网站上的文档安装 4.1 版本的 OroCRM,除了 composer 应用程序名称,请将其替换为crm-application.

OAuth 铅

请安装 4.1 版本的 CRM 应用程序并重新开始。如果仍然无法正常工作,请在var/logs文件夹中查找错误消息。

于 2020-02-26T13:03:03.303 回答