In general the menu structure of invite and invite_mail is a bit strange and feel "all over the place".
In particular if if you want to update the default subject and body for all invite you have to edit the fields as indicated:
"You may update the default subject and body for all invites on the fields edit page."
Yet this link point on /admin/structure/invite/settings/fields but their is no menu entry for /admin/structure/invite/ and /admin/structure/invite/settings/ link that is present in the breadcrumb fail with an error:
InvalidArgumentException: Class "Drupal\invite\Form\InviteSettingsForm" does not exist. in Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (line 24 of /web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | invite-config-screen-with-patch.png | 124.52 KB | dale42 |
| #3 | invite-parent-menu-3274361-3.patch | 1.63 KB | dale42 |
Comments
Comment #2
gagarine commentedComment #3
dale42Cause
The
field_ui_base_routeannotation defining the Invite-entity points to a non-existant route.Solutions
Easiest Solution
Attached is a patch that points the
field_ui_base_routeto the current settings page (which is actually titled Invite Config). Drupal's entity configuration automatically attaches the Manage fields, Manage form display, and Manage display tabs.I don't really like this solution.
It puts the Invite Type config-entity forms in the same place as the Invite content-entity forms, which is potentially confusing and not consistent with the way the rest of Drupal lays things out.
However, making this consistent with the rest of Drupal would involve an extentive moving around of the menus, and perhaps this should not done in this release.
Alternative Solution
Create a placeholder settings page for /admin/structure/invite/settings. There is nothing to put on this page, so perhaps just links to the configuration page where the settings are. The would keep the Invite content-entity and Invite Type config-entity pages separated and fix the error.
Best Solution
Make the placement of the Invite content-entity and Invite Type config-entity consistent with the typical Drupal placement.
This would involve moving the Invite settings under the Structure menu and Invite Type under the Configuration menu. This is the reverse of how Invite 8.x-1.x is currently set up. As @gagarine pointed out, and I feel the same, the Invite User Interface doesn't feel right. I believe this reversal is part of the reason.
This change is probably better done in the 2.0.x release.
Moving forward
Would love for interested parties to provide feedback on solutions I may have missed. Is there some other simple solution?
Failing that, @RenatoG, please let me know if there are any changes you'd like to see.
Comment #4
dale42For reference, this is what the Invite Config page looks like after the patch:
Comment #5
renatog commentedApplied the patch and it fixed the problem.
@dale42 I agree with you at #3 about the easiest solution and best solution. I think we can fix that for now to solve the problem and we can track the best solution at 2.0.x as you said
Comment #7
renatog commentedCommitted the fix to 8.x-1.x. Thanks a lot @dale42