Problem/Motivation

If I try to run Recurring Events together with the Group Module 2.0.x it throws fatal errors. I strongly suspect that this is, at least in part, because the Group Module API has changed from Group v8.x-1.5

Steps to reproduce

  • Set up with versions Drupal 9.4.8, Group 2.0.0-beta3, Recurring Events 2.0.0-rc5
  • Enable all except the Group Recurring Events module. Both Group and Recurring Events work correctly, but separately.
  • Enable the Group Recurring Events module. It throws the first error below when trying to open a Group page.
  • In the file /recurring_events/modules/group_recurring_events_series/config/optional/views.view.group_recurring_events_series.yml change lines
    438, 491 and 542 to read table: group_relationship instead of table: group_content. (This is copied from the Group Module MR#57)
  • It then throws the second error shown below instead.

First Error
Error: Class 'Drupal\group\Entity\Controller\GroupContentController' not found in include() (line 17 of /home/lalg/www/d9dev2/web/modules/contrib/recurring_events/modules/group_recurring_events_series/src/Controller/GroupEventSeriesController.php)
Backtrace file attached.

Second Error
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "view.group_recurring_events_series.page_1" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of /home/lalg/www/d9dev2/web/core/lib/Drupal/Core/Routing/RouteProvider.php).

Proposed resolution

I do not know the cause or fix for the second error, but implementation of the fix for the first will need to allow for running with either Group v8.x-1.5 or v2.0.x, as present at the time.

API changes

See Group module documentation.

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:

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

Anonymous’s picture

maynardsmith created an issue. See original summary.

owenbush’s picture

Thank you for raising this issue. I'll try and find some time to take a look into it in more depth.

Chris Dart made their first commit to this issue’s fork.

msielski’s picture

Attaching patch I created and am testing to use recurring events with group 2.x. I believe more work will still be needed.

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

muriqui’s picture

Version: 2.0.0-rc5 » 2.0.x-dev
Status: Active » Needs work

Created a merge request with the changes from msielski's patch, plus converting the GroupEventSeriesPermissionProvider. Haven't had a chance to test this yet, so marking as "needs work." (Also hiding the patch file from issue description so as to direct people's attention to the MR for latest changes.)

muriqui’s picture

Status: Needs work » Needs review
Rotekian’s picture

This fixed things for me.

muriqui’s picture

Project: Recurring Events » Group Recurring Events
Version: 2.0.x-dev » 1.0.0-alpha1
Component: Recurring Events (Main module) » Code
Status: Needs review » Active

The group_recurring_events_series module has been split off into its own project, so moving this over to their issue queue.

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

jrb’s picture

Version: 1.0.0-alpha1 » 1.x-dev
Status: Active » Needs review

I've created a new issue fork and MR for this work since the previous MR was done when this was still part of the Recurring Events module.

The code here really needs to be done as a separate branch for working with Group v2 since it cannot support both Group v1 and Group v2 at the same time.

jrb changed the visibility of the branch 3318490-group-v2 to hidden.

jrb’s picture

We finally got around to trying to use the code from the previous work in 2024, and it just didn't work at all. There were multiple errors when trying to upgrade a site from Group v1 to v2:

>  [error]  The "group_recurring_events_series:default" plugin does not exist. Valid plugin IDs for Drupal\group\Plugin\Group\Relation\GroupRelationTypeManager are: group_node:classified_ad, group_node:dining_daily_special, group_node:dining_menu, group_node:document, group_node:meeting, group_node:news, group_node:order_form, group_node:page, group_node:resident, group_node:search_item, group_node:site_message, group_node:staff, group_node:video, group_node:webform, group_membership
>  [error]  Update failed: group_update_9200
>  [notice] Update started: field_inheritance_update_10300
>  [error]  Drupal\search_api\SearchApiException while adding Views handlers for field Content » Categories on index Default content index: Could not retrieve data definition for field 'Categories' on index 'Default content index'. in Drupal\search_api\Item\Field-

The Search API might be specific to our site, but the missing plugin is definitely a problem.

I've created an entirely new branch in the exact same way I created the original version of this module back in 2021-- by copying the gnode module from the Group module. That worked. We were able to upgrade an existing site from Group v1 and Recurring Events v2 to Group v2 and Recurring Events v3. There's an MR for this.

As stated above, the code here really needs to be done as a separate branch for working with Group v2 since it cannot support both Group v1 and Group v2 at the same time.