When I edit a node's group content entity, at group/X/node/Y/edit, the form says:

> The entity to add to the group.

(BTW, is it right that it's possible to change the node that this group content points to?)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim created an issue. See original summary.

kristiaanvandeneynde’s picture

Issue tags: +Deeson sprint

That field should be disabled or even hidden during edits. Valid bug report.

jludwig’s picture

This patch uses the same approach used by the group membership plugin to solve this issue.

Note that it likely has the same issue noted here: https://www.drupal.org/node/2693215 but I'd like to get some opinions on how that should be solved rather than including a fix for that with this.

kristiaanvandeneynde’s picture

Status: Needs review » Needs work

That will disable the field on add forms as well, which is not the point :)

jludwig’s picture

Haha, well that was slightly embarrassing. I'll blame it on not being able to read late at night. :P

This should prevent it from showing up on the add forms.

jludwig’s picture

Status: Needs work » Needs review
kristiaanvandeneynde’s picture

Status: Needs review » Reviewed & tested by the community

Looks great!

Perhaps in a later phase we can make it configurable on the plugin so it can choose whether a relationship can change its subject. For now, I don't see any use cases and it would severely cause issues for any access controlling extensions such as Group Node. So your patch seems excellent for the time being.

Will commit after running some tests, but setting to RTBC so it's on my radar :)

zerolab’s picture

Does this need a re-roll?

kristiaanvandeneynde’s picture

Status: Reviewed & tested by the community » Fixed

Lost track of this, thanks for the reminder zerolab. It did need a reroll but it was so ridiculously easy I went ahead and did it. Credit goes to jludwig.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

The last submitted patch, 3: group-disable_gnode_entity_ref-2706373-0.patch, failed testing.

Status: Closed (fixed) » Needs work

The last submitted patch, 5: group-disable_gnode_entity_ref-2706373-1.patch, failed testing.

kristiaanvandeneynde’s picture

Status: Needs work » Closed (fixed)

Bad testbot! :)