When I use this module to use the mapping in a node got the following error:

Error: Call to a member function addContent() on null in /docroot/modules/contrib/group_mapping_from_node/group_mapping_from_node.module on line 132 #0 [internal function]: group_mapping_from_node_custom_submit(Array, Object(Drupal\Core\Form\FormState))

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

janmejaya created an issue. See original summary.

anisha.challa’s picture

Assigned: Unassigned » anisha.challa
anisha.challa’s picture

Status: Active » Needs review
StatusFileSize
new547 bytes

Uploaded the patch for this issue. Please review.

maurizio.ganovelli’s picture

StatusFileSize
new901 bytes
new733 bytes

Patch solves the error but during node creation, if you try to assign a group, you get this warning:

Warning: array_flip(): Can only flip STRING and INTEGER values!

and new group relation is not created. Works well only on edit.

Attached rerolled patch works in both cases.

jonathan_hunt’s picture

Patch in #4 works for me, thanks.

anisha.challa’s picture

Assigned: anisha.challa » Unassigned
neerajsingh’s picture

Status: Needs review » Reviewed & tested by the community

Patch at #4 worked for me too.

jcandan made their first commit to this issue’s fork.

  • jcandan committed 0636ac8 on 8.x-1.x
    Issue #3114431 by jcandan, maurizio.ganovelli: Call to a member function...
jcandan’s picture

jcandan’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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