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