{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Developer Portal (Drupal-based) /
avatar image
0
Question by Andrey Biryukov · Jan 14 at 05:05 PM · 40 Views Drupal-based portals

Drupal 9 Portal Apigee connection problem

Hi everyone,
I'm new to Drupal so obv going through some bumps. Currently working on Drupal 9-based apigee dev portal.

Set it up locally by using Apigee Kickstart (XAMPP server) since I'm on Windows 10 - all good and well. Site is up and such. Tried to set up Apigee connection: config -> apigee-edge -> settings: APIGEE EDGE CONNECTION SETTINGS

Put all my live creds and hit "Test" button - nothing. Checked the log report and found this php error:

TypeError: Apigee\Edge\Api\Management\Entity\Organization::setEnvironments(): Argument #1 must be of type string, array given, called in C:\apigee_local\vendor\symfony\property-access\PropertyAccessor.php on line 564 in Apigee\Edge\Api\Management\Entity\Organization->setEnvironments() (line 40 of C:\apigee_local\vendor\apigee\apigee-client-php\src\Entity\Property\EnvironmentsPropertyAwareTrait.php)

#0 C:\apigee_local\vendor\symfony\property-access\PropertyAccessor.php(564): Apigee\Edge\Api\Management\Entity\Organization->setEnvironments(Array)
#1 C:\apigee_local\vendor\symfony\property-access\PropertyAccessor.php(114): Symfony\Component\PropertyAccess\PropertyAccessor->writeProperty(Array, 'environments', Array)
#2 C:\apigee_local\vendor\apigee\apigee-client-php\src\PropertyAccess\PropertyAccessorDecorator.php(53): Symfony\Component\PropertyAccess\PropertyAccessor->setValue(Object(Apigee\Edge\Api\Management\Entity\Organization), 'environments', Array)
#3 C:\apigee_local\vendor\symfony\serializer\Normalizer\ObjectNormalizer.php(147): Apigee\Edge\PropertyAccess\PropertyAccessorDecorator->setValue(Object(Apigee\Edge\Api\Management\Entity\Organization), 'environments', Array)
#4 C:\apigee_local\vendor\symfony\serializer\Normalizer\AbstractObjectNormalizer.php(361): Symfony\Component\Serializer\Normalizer\ObjectNormalizer->setAttributeValue(Object(Apigee\Edge\Api\Management\Entity\Organization), 'environments', Array, 'json', Array)
#5 C:\apigee_local\vendor\apigee\apigee-client-php\src\Denormalizer\ObjectDenormalizer.php(111): Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer->denormalize(Object(stdClass), 'Apigee\\Edge\\Api...', 'json', Array)
#6 C:\apigee_local\vendor\symfony\serializer\Serializer.php(196): Apigee\Edge\Denormalizer\ObjectDenormalizer->denormalize(Object(stdClass), 'Apigee\\Edge\\Api...', 'json', Array)
#7 C:\apigee_local\vendor\symfony\serializer\Serializer.php(143): Symfony\Component\Serializer\Serializer->denormalize(Object(stdClass), 'Apigee\\Edge\\Api...', 'json', Array)
#8 C:\apigee_local\vendor\apigee\apigee-client-php\src\Serializer\EntitySerializer.php(124): Symfony\Component\Serializer\Serializer->deserialize(Object(stdClass), 'Apigee\\Edge\\Api...', 'json', Array)
#9 C:\apigee_local\vendor\apigee\apigee-client-php\src\Controller\EntityLoadOperationControllerTrait.php(43): Apigee\Edge\Serializer\EntitySerializer->deserialize('{\n  "createdAt"...', 'Apigee\\Edge\\Api...', 'json')
#10 C:\apigee_local\web\modules\contrib\apigee_edge\src\SDKConnector.php(282): Apigee\Edge\Api\Management\Controller\OrganizationController->load('first-american-...')
#11 C:\apigee_local\web\modules\contrib\apigee_edge\src\KeyEntityFormEnhancer.php(345): Drupal\apigee_edge\SDKConnector->testConnection(Object(Drupal\key\Entity\Key))
#12 [internal function]: Drupal\apigee_edge\KeyEntityFormEnhancer->validateForm(Array, Object(Drupal\Core\Form\FormState))
#13 C:\apigee_local\web\core\lib\Drupal\Core\Form\FormValidator.php(82): call_user_func_array(Array, Array)
#14 C:\apigee_local\web\core\lib\Drupal\Core\Form\FormValidator.php(273): Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object(Drupal\Core\Form\FormState))
#15 C:\apigee_local\web\core\lib\Drupal\Core\Form\FormValidator.php(118): Drupal\Core\Form\FormValidator->doValidateForm(Array, Object(Drupal\Core\Form\FormState), 'apigee_edge_aut...')
#16 C:\apigee_local\web\core\lib\Drupal\Core\Form\FormBuilder.php(589): Drupal\Core\Form\FormValidator->validateForm('apigee_edge_aut...', Array, Object(Drupal\Core\Form\FormState))
#17 C:\apigee_local\web\core\lib\Drupal\Core\Form\FormBuilder.php(321): Drupal\Core\Form\FormBuilder->processForm('apigee_edge_aut...', Array, Object(Drupal\Core\Form\FormState))
#18 C:\apigee_local\web\core\lib\Drupal\Core\Controller\FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\apigee_edge\Form\AuthenticationForm), Object(Drupal\Core\Form\FormState))
#19 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#20 C:\apigee_local\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#21 C:\apigee_local\web\core\lib\Drupal\Core\Render\Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#22 C:\apigee_local\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#23 C:\apigee_local\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#24 C:\apigee_local\vendor\symfony\http-kernel\HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#25 C:\apigee_local\vendor\symfony\http-kernel\HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#26 C:\apigee_local\web\core\lib\Drupal\Core\StackMiddleware\Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 C:\apigee_local\web\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 C:\apigee_local\web\core\modules\page_cache\src\StackMiddleware\PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 C:\apigee_local\web\core\modules\page_cache\src\StackMiddleware\PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 C:\apigee_local\web\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 C:\apigee_local\web\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 C:\apigee_local\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 C:\apigee_local\web\core\lib\Drupal\Core\DrupalKernel.php(706): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 C:\apigee_local\web\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#35 {main}

Checked curl call to apigee and saw valid response there from apigee...

Seems to me like something isn't right with the way returned environments array is parse out in Drupal.

Any thoughts what could that be?

Many thanks in advance

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

2 Answers

  • Sort: 
avatar image
0

Answer by Swapna Nisha · Jan 21 at 01:01 PM

Hi Andrey,


You might have to look into the PHP version that you are running. The version should be 7.4.

$ php -v

PHP 7.4.11 (cli) (built: Sep 29 2020 13:18:06) ( ZTS Visual C++ 2017 x64 ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.11, Copyright (c), by Zend Technologies


Hope this helps .

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Andrey Biryukov · Jan 21 at 03:21 PM

Thanks Swapna! I figured that might be the case - have successful set up on another machine with PHP 7.4. Cheers!

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

80 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Apigee Java based developer portal 1 Answer

Load jQuery on Apigee integrated portal. 0 Answers

Drupal 7 based Portal - PHP 7.3.15 security issues validations 1 Answer

How to restrict access to App Consumer Key and Consumer Secret on Developer Portal 1 Answer

Getting "Unable to create new spec" while uploading a new spec to the portal 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges