Problem/Motivation
Entity repeat group module does not work with newer version of group.
Error: Call to undefined method Drupal\group\Entity\Group::addContent() in _entity_repeat_group_submit() (line 107
addContent and other group functions has been replaced by "addRelationship()"
Steps to reproduce
Install this module with the latest versions of group in D9.4
Proposed resolution
Code needs update
See https://www.drupal.org/docs/contributed-modules/group/updating-your-modu...
for information on the relationship handlers needed
Comments
Comment #3
kyoder commentedSupport for Group 3 added in latest stable release 1.0.9
Comment #4
kyoder commentedComment #5
kyoder commentedComment #6
webberly commentedThank you for your work.
It looks like $group_content_enabler in "$group->addRelationship($replicate, $group_content_enabler);" is NULL so its not creating the relationship and throws and error "Drupal\Component\Plugin\Exception\PluginNotFoundException: Plugin ID '' was not found. in Drupal\Core\Plugin\DefaultLazyPluginCollection->initializePlugin() (line 79 of /var/www/clients/client1/web19/web/web/core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php)."
In the batch processing it only creates the first entity with the relationship, the others are created without the group relationship.
When I manually replace "$group->addRelationship($replicate, $group_content_enabler);"
with
$group->addRelationship($replicate, "name_of_plugin:bundle_name");
it works
So it might be able to get the plugin and bundle from $form_state->getformObject()->getEntity();
Comment #7
kyoder commentedThank you for the bug report webberly and your patience, I've made a new release 1.1.0 that should resolve all the issues with Group 3.