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

Uncaught PHP Exception TypeError ... /apigee_edge/src/Entity/Developer.php line 526 #1048

Open
Cleets opened this issue Mar 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Cleets
Copy link

Cleets commented Mar 21, 2024

Description

When modifying a user profile in any way we are getting
Uncaught PHP Exception TypeError: "Drupal\apigee_edge\Entity\Developer::getCacheMaxAge(): Return value must
be of type int, null returned" at /var/www2/devportalsandbox/web/modules/contrib/apigee_edge/src/Entity/Developer.php line 526" while reading response header from upstream,

The code at that point is:
public function getCacheMaxAge(): int {
return \Drupal::config('apigee_edge.developer_settings')->get('cache_expiration');
}

In our configuration, this function is returning NULL .

Apigee Info

We are using Apigee Edge 3.0.6

Steps to Reproduce

Steps to reproduce the behavior:

  1. modify a user record within the 'people' view and attempt to save it.
  2. without these values set, you will get a white screen and the user's profile will not be saved.
@Cleets Cleets added the bug Something isn't working label Mar 21, 2024
@kedarkhaire
Copy link
Collaborator

Hi @Cleets

Thanks for sharing the details here.
I tried with saving user record in the People's page (admin/people), I didn't got any error.

In 2nd step you have mentioned, without these values set, we get WSOD and the user record is not saved, here we are not sure of the values you are mentioning.

Can you please share the steps with proper user journey, where you face this issue,
Do also let us know, if you are using default cache_expiration provided by the module or modified to some other value.

Thanks!

@Cleets
Copy link
Author

Cleets commented Mar 22, 2024

Thanks for hte response ... let me put the updates in here on Sunday.
Our QA is usinghte environment right now and I've temporarily worked around the issue by forcing the
getCacheMaxAge() function to return -1 .

But I can recreate the issue by the end of the weekend.
Cheers,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants