- 🇨🇦Canada jigarius Montréal
While trying the patch in #47, I get the following issues:
* UserInlineForm should useEntityInterface $entity
instead ofContentEntityInterface
to be compatible with the parent class.
* The inline form works in the "default" form mode but it doesn't work with custom form modes that I've created, say "membership". I get the following error:Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "user" entity type did not specify a "membership" form class. in Drupal\Core\Entity\EntityTypeManager->getFormObject() (line 207 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
over 1 year ago Not currently mergeable. - @jigarius opened merge request.
- last update
over 1 year ago PHPLint Failed - 🇨🇦Canada jigarius Montréal
I took a look at the patch 47 and created a PR with some changes. In the end, I got the user creation to work, but for some reason, the newly generated user's ID doesn't get attached to the parent entity's form correctly, i.e. the inline_entity_form elements are not replaced by a nice target_id so the parent form fails to submit.
In patch 47, the "account" element for the user data don't get copied into the User entity because the AccountForm expects a different structure of values in the FormState. I'm starting to think that it might be better to create a simplified version of the user account form for use with the InlineEntityForm instead of involving AccountForm at all.
As for my project, I'll be simplifying this by injecting just: name, mail, pass, status, and the Field API fields, if any. At least it will get the ball rolling for me.
- last update
over 1 year ago PHPLint Failed