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

Missing operation on custom entity form. #793

Closed
FCsongradi opened this issue Feb 1, 2023 · 2 comments · Fixed by #792
Closed

Missing operation on custom entity form. #793

FCsongradi opened this issue Feb 1, 2023 · 2 comments · Fixed by #792
Labels
bug Something isn't working

Comments

@FCsongradi
Copy link
Contributor

Description

On the AuthenticationForm custom entity form, the operation is missing. This causes an error on the /admin/config/apigee-edge/settings page. The error happens because the operation is null and string is expected in hook_entity_prepare_form(). I've found this issue while using the ECA module. The eca_content submodule implemented hook_entity_prepare_form().

Apigee Info

Apigee Edge

Steps to Reproduce

Steps to reproduce the behavior:

  1. Install the ECA module
  2. Install Apigee Edge module.
  3. Go to the Apigee General settings: /admin/config/apigee-edge/settings

Actual Behavior

An error occurred and the Apigee General settings page cannot be opened.

Expected Behavior

Opening the Apigee General settings page without the error.

Screenshots

image

Notes

I've found the operation set in routing.yml elsewhere.
example:

entity.crop_type.edit_form:
path: '/admin/config/media/crop/manage/{crop_type}'
defaults:
_entity_form: 'crop_type.edit'
requirements:
_permission: 'administer crop types'

Version Info

apigee_edge 2.0.6

@FCsongradi FCsongradi added the bug Something isn't working label Feb 1, 2023
@FCsongradi
Copy link
Contributor Author

PR with a possible solution for the issue: #792

@mxr576
Copy link
Contributor

mxr576 commented Feb 1, 2023

This issue relies on the fact that AuthenticationForm is extending EntityFormBase but not exposed as an entity form in routing, therefore \Drupal\Core\Entity\HtmlEntityFormController::getFormObject() does not do its "magic". But... since AuthenticationForm has a dual behavior, both handles create and edit process, we most probably could not even consider using _entity_form.

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.

2 participants