Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CpsNotEnabledException #123

Closed
cnovak opened this issue Jan 29, 2019 · 13 comments
Closed

CpsNotEnabledException #123

cnovak opened this issue Jan 29, 2019 · 13 comments

Comments

@cnovak
Copy link
Collaborator

cnovak commented Jan 29, 2019

I'm getting

Apigee\Edge\Exception\CpsNotEnabledException: in Apigee\Edge\Api\Management\Controller\AppByOwnerController->createPager() (line 45 of /app/vendor/apigee/apigee-client-php/src/Controller/PaginationHelperTrait.php)

when clicking My Apps after I created a user.

Does CPS have to be enabled in order to use this drupal 8 module?

Originally posted by @rodvina in #120 (comment)

@mxr576
Copy link
Contributor

mxr576 commented Jan 29, 2019

@cnovak Isn't CPS enabled on all orgs? For me it seems it does available on every org in the public cloud. What about the private cloud builds?

Which version of Apigee Edge are you working with @rodvina?

@arunz6161
Copy link
Collaborator

@mxr576 CPS is not available in private cloud yet and yes, it is enabled on all orgs on cloud.

@rodvina
Copy link

rodvina commented Jan 29, 2019

@arunz6161 when will CPS be available in private cloud? Is this a prerequisite to drupal 8 portal?

@mxr576
Copy link
Contributor

mxr576 commented Jan 29, 2019

At this moment it is, precisely it is a feature of Apigee Edge that the new https://github.com/apigee/apigee-client-php relies on, so the Drupal 8 module does too.
Good question when CPS gets available in private cloud. Back in the days, I mentioned to @cnovak that maybe we should have a documented minimum required Apigee Edge version but I hoped that we will never need to make a distinction between on-prem and public cloud installations.
Identifying whether CPS is supported on an org and sending the correct CPS or non-CPS request could increase the complexity in the PHP API client.

@mxr576
Copy link
Contributor

mxr576 commented Jan 29, 2019

@rodvina you can register a free trial org on https://login.apigee.com/login to try out the Drupal 8 module until we settle this problem and have a conclusion.

@rodvina
Copy link

rodvina commented Jan 29, 2019

@mxr576 Unfortunately we are on version 18.01 of private cloud and was looking into using Drupal 8 for our portal. Based on this, is our only option Drupal 7 at this time?

mxr576 added a commit to mxr576/apigee-client-php that referenced this issue Jan 30, 2019
CPS is not enabled on on-prem installations at this moment.

apigee/apigee-edge-drupal#123
@mxr576
Copy link
Contributor

mxr576 commented Jan 30, 2019

@rodvina I have already implemented a fix for this problem, if you want you can install the above pull request with composer patches on your development out, just add this to Drupal's composer.json.
(If patching fails, try to install the latest dev from the PHP API client.)

        "patches": {
            "apigee/apigee-client-php": {
              "CPS Fix": "https://github.com/apigee/apigee-client-php/pull/43.diff"
            },
        }

mxr576 added a commit to mxr576/apigee-client-php that referenced this issue Jan 30, 2019
CPS is not enabled on on-prem installations at this moment.

apigee/apigee-edge-drupal#123
@rodvina
Copy link

rodvina commented Jan 31, 2019

@mxr576 I tried but got this:

@mxr576
Copy link
Contributor

mxr576 commented Feb 1, 2019

Failed Key module patch is fine, patch is not longer required since Key 1.8 and it will be removed in the next release.

Apigee Client PHP patching works if you install the latest dev version from the PHP API client as I suggested earlier.

$composer require apigee/apigee-client-php:2.x-dev
    Finished: success: 12, skipped: 0, failure: 0, total: 12                                       ./composer.json has been updated                            Gathering patches for root package.
Removing package apigee/apigee-client-php so that it can be re-installed and re-patched.
  - Removing apigee/apigee-client-php (2.0.0)
Removing package drupal/key so that it can be re-installed and re-patched.
  - Removing drupal/key (1.8.0)
Deleting web/modules/contrib/key - deleted
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information                                                   Updating dependencies (including require-dev)             1/1:        https://codeload.github.com/apigee/apigee-client-php/legacy.zip/3e23f5eb327836bd214a57e002f9c81246933bec
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Package operations: 2 installs, 1 update, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing apigee/apigee-client-php (2.x-dev 3e23f5e): Cloning 3e23f5eb32 from cache
  - Applying patches for apigee/apigee-client-php
    https://github.com/apigee/apigee-client-php/pull/43.diff (CPS Fix)

  - Installing drupal/key (1.8.0): Loading from cache
  - Applying patches for drupal/key
    https://www.drupal.org/files/issues/2018-06-27/key-fix-implementation-of-nonekeyinput-2982124-2.patch (Fix implementation of NoneKeyInput)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2018-06-27/key-fix-implementation-of-nonekeyinput-2982124-2.patch

We are planning to release a new version from both the PHP API client and the Drupal 8 module in the upcoming days with this fix and bunch of other improvements/new features.

@mxr576
Copy link
Contributor

mxr576 commented Feb 4, 2019

Fix merged to the PHP API client, it will be part of the next release.

@cnovak
Copy link
Collaborator Author

cnovak commented Feb 5, 2019

@rodvina let us know if you still have any issues with this fix. I will set as closed for until we hear otherwise.

@cnovak cnovak closed this as completed Feb 5, 2019
mxr576 added a commit to mxr576/apigee-client-php that referenced this issue Feb 6, 2019
CPS is not enabled on on-prem installations at this moment.

apigee/apigee-edge-drupal#123
@cnovak
Copy link
Collaborator Author

cnovak commented Feb 6, 2019

@rodvina wanted to let you know that this fix has been put out in the 8.x-1.0-beta2 release.

@rodvina
Copy link

rodvina commented Feb 6, 2019

@cnovak - thanks, I will check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants