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

PHP error with validation server side #655

Closed
Spooky063 opened this issue Jan 24, 2022 · 0 comments · Fixed by #656
Closed

PHP error with validation server side #655

Spooky063 opened this issue Jan 24, 2022 · 0 comments · Fixed by #656
Labels
bug Something isn't working

Comments

@Spooky063
Copy link
Contributor

Description

I enabled inline errors module on all my forms (login, register, ...) to remove the client side validation and manage them on the server side.
But when I apply it on my registration form and submit it (without having filled any field), I get a 500 error with the following message:

TypeError: Return value of Drupal\apigee_edge\Entity\Controller\Cache\DeveloperIdCache::getEntityId() must be of the type string, null returned in Drupal\apigee_edge\Entity\Controller\Cache\DeveloperIdCache->getEntityId() (line 40 of modules/contrib/apigee_edge/src/Entity/Controller/Cache/DeveloperIdCache.php).

I haven't tried to apply the same changes for the app creation/editing form but it should work too.

Steps to Reproduce

  1. Override the register form,
function HOOK_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void
{
  if ($form_id === 'user_register_form') {
    $form['#attributes']['novalidate'] = 'novalidate';
  }
}
  1. Go to registration page (/user/register),
  2. Did not fill in any fields,
  3. Submit the form.

Actual Behavior

When I submit the form, I get an error instead of inline errors.

Expected Behavior

When I submit the form, I would like to find my form with the error messages on the concerned fields.

Screenshots

Error catch
apigee-edge-register-form-error

Notes

NC

Version Info

I use the following versions:

  • Apigee Edge: 8.x-1.25
  • Apigee API Catalog: 8.x-2.6
  • Apigee Edge API product RBAC: 8.x-1.25
  • Apigee Monetization: 8.x-1.12
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

Successfully merging a pull request may close this issue.

1 participant