Search code examples
orocrmorocommerce

Orocrm - Missing web api activation UI in backoffice


1. Web Api

I can't make the api work at all. First of all i was interrested in OROCRM only and not oroCommerce, so my first step was taken here : https://github.com/oroinc/crm-application/tree/master

Great, now i follow the installation link on that github and end up here : https://doc.oroinc.com/backend/setup/dev-environment/manual-installation/crm-ce/

Ok it looks nice and documented, BUT when i reached this part : https://doc.oroinc.com/backend/setup/dev-environment/manual-installation/crm-ce/#step-3-oro-app-name-application-installation

The composer link is wrong :

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

It made me loose hours to end up with a OroCommerce installation (correct me if i am wrong, it should be oro/crm-application, maybe adapt the documentation ? add a warning or something ?)

Anyways, since i didn't want to start all over again, i kept that oro commerce installation (v. 4.0). But now, its simply impossible to enable the web api.

As the documentation states here, i should be able to activate it in the back office : https://doc.oroinc.com/api/enabling-api-feature/

But, here's what i have in my back office : enter image description here

I cleared the cache in prod & dev, i ran the php bin/console oro:api:doc:cache:clear --env=prod command in prod & dev as well, Nothing works.

Processes are running, cron task as well, i did not install sample data (fixtures). Here's the composer.json of the installation :

{
  "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 Pb

Another issue, i added the public and private keys in the /var folder as stated here : https://doc.oroinc.com/user/back-office/getting-started/user-menu/oauth/

But i still have the same error message (even after a cache:clear) : OAuth authorization is not available as encryption keys configuration was not complete. Please contact your administrator.

Please i need help !

EDIT 1

Regarding the Oauth issue, my problem was the name of the two files. It is not specified anywhere in the documentation, i actually found the answer looking at bitnami's code, the two files should be named :

  • oauth_private.key
  • oauth_public.key

Solution

  • Oro commerce installation (v. 4.0).

    You are using a 4.0 version, but browse documentation for 4.1 version. In 4.0 there was no such an option and API was always enabled. There is no documentation for the 4.0 version as it's unsupported preview version. Consider to upgrade, or if it's a new installation, better to reinstall the plain CRM

    The composer link is wrong

    Yes, you are right, we'll fix it, thanks for noticing. For now, you can install 4.1 version of OroCRM by following the documentation on a website, except the composer application name, please replace it to the crm-application.

    OAuth Pb

    Please install 4.1 version of a CRM application and start over. If it will still not work, look for error messages in a var/logs folder.