Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The author is set to "Anonymous (not verified)" when creating or editing a node via the Inline Entity Form.
Expected behaviour would be to set the author information to the one that is logged in, or to inherit the author of the parent node.
Comment | File | Size | Author |
---|---|---|---|
#10 | ief-nodes_author_is_always-2593269-10.patch | 1.61 KB | tedbow |
| |||
#8 | ief-nodes_author_is_always-2593269-8.patch | 0 bytes | tedbow |
| |||
#6 | ief-nodes_author_is_always-2593269-6_TEST_ONLY.patch | 1.61 KB | tedbow |
Comments
Comment #2
slashrsm CreditAttribution: slashrsm as a volunteer commentedComment #3
tedbowI have tested this with the Simple widget.
It seems that now the behavior is that the logged in user is the author regardless of the whether the author of the parent node is set to a different user or not.
So if the user has permission and sets the parent node to a different user the current user is still the author of the child node.
I assume the correct behavior would be that whoever is set to the author of the parent node on the nodes in the IEF widgets should use that author.
Comment #4
tedbowComment #5
tedbowThis issue is really blocked by #2667710: Rewrite the base inline form handling.
Because right now if you give a user the permission to set the author of a node they will get a "Authored by" widget for the parent AND child nodes in IEF widgets.
So presumably the child widget if shown(which it should not be) should probably win.
Comment #6
tedbowHere is test to check owner of parent and child nodes in simple widget. It currently fails.
This test should probably eventually be added to test in #2667710: Rewrite the base inline form handling
So we could have single test for adding IEF nodes as admin.
Comment #8
tedbowChanging title back. I was wrong I think about expected behavior.
I checked Drupal 7 version "author information to the one that is logged in" is what happens and there are no open issues regarding this so I am assuming this is correct.
So he 8.x-1.x-dev version already works.
I am updating the patch with just the test changed to confirm it works.
Comment #10
tedbowmy bad uploaded a empty patch. re uploaded
Comment #11
tedbowOk. This must have been fixed in other commits.
So the test just confirms this.
Comment #12
bojanz CreditAttribution: bojanz at Centarro commentedNot sure the test in #10 is useful, considering that the "uid defaults to the current user" behavior comes from TypedData / the entity field itself? We're not testing our own logic.
Comment #13
bojanz CreditAttribution: bojanz at Centarro commentedWe decided not to chase this based on #12.