Steps to Reproduce
Create a taxonomy with 2 or more terms
Add that taxonomy as a reference field to Registrant Type
Add the taxonomy field to the registrations view.
Create and event
Create 2 or more registrations in an instance and select different terms from the taxonomy for each registration.
Go into Structure>Taxonomy and delete one of the terms
then go back to the registrations page and you'll see the registration that had the deleted taxonomy term is also deleted.

If you delete the registrations view, then the following error occurs:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "view.registrations.event_registrant_list" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 208 of /var/www/html.original/core/lib/Drupal/Core/Routing/RouteProvider.php).

This is because the event instance is expecting that route to exist, but it no longer does. So this needs to be addressed - if the view is removed, the tab should fall back to using the entity list.

Comments

the_glitch created an issue. See original summary.

the_glitch’s picture

Also the deleted registrations with the deleted term don't make any registration spaces available in the events they were registered in.

the_glitch’s picture

This bug then prevents any future registrations from saving/registering in any events.

the_glitch’s picture

Priority: Major » Critical
the_glitch’s picture

Furthermore, if the taxonomy is then deleted from the Registrant Type all the tabs for the Event Instances disappear.

owenbush’s picture

Title: If a taxonomy is added to Registrant and a term is deleted, all registrations with that term get deleted. » If registrant view is removed, even instance pages break
Issue summary: View changes
the_glitch’s picture

It happens when a taxonomy term is deleted, not a view. But what I've found is that when a taxonomy term is deleted that belongs to a taxonomy field that is within the view, then the view breaks. Deleting all those taxonomy fields from the view then resolves the problem but it's only a term that was deleted not the taxonomy/vocabulary itself.

owenbush’s picture

When I removed the taxonomy field, it also deleted the view during the testing just now. But none of the other bugs reported in this issue were recreatable.

the_glitch’s picture

ok i'm not sure if this is causing part of the issue but it might be worth mentioning that the taxonomy fields in the view are views_entity_form_fields.

owenbush’s picture

Because that issue is not recreatable with a base install of recurring events, unfortunately its a "won't fix". It might be worth looking at views_entity_form_fields to see if this issue is reported there.

In the meantime, I will address the part of this ticket that is reproducible which is the broken instance pages if the view is removed.

owenbush’s picture

Adding RE Stable Release Blocker tag

owenbush’s picture

Status: Active » Needs review
StatusFileSize
new1.71 KB

Attached is a patch to handle the issue of removing the registrants view resulting in a WSOD on event instance pages.

  • owenbush committed e7cce8a on 8.x-1.x
    Issue #3126680 by owenbush, the_glitch: If registrant view is removed,...
owenbush’s picture

Status: Needs review » Fixed

This has been merged. Marking as fixed.

Status: Fixed » Closed (fixed)

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

vlad.dancer’s picture

I'm little confused should I request reopening issue here or create a new one?

With latest dev version and installed recurring_events_views module when I import configurations I see next error: "Route "view.registrations.event_registrant_list" does not exist.".
I've looked into recurring_events_views_local_tasks_alter() function and default views that comes with recurring_events_views module and found that we missed to add views display id into the route name:

    try {
      if (\Drupal::service('router.route_provider')->getRouteByName('view.recurring_events_registrations.event_registrant_list')) {
        if (!empty($local_tasks['entity.registrant.instance_listing'])) {
          $local_tasks['entity.registrant.instance_listing']['route_name'] = 'view.recurring_events_registrations.event_registrant_list';
          $local_tasks['entity.registrant.instance_listing']['id'] = 'view.recurring_events_registrations';
        }
      }
    }

The fix from above resolved the error now.

Also it seems since we declared views.view.recurring_events_registrations as an optional configuration then I think it is better to ignore RouteNotFoundException and avoid logging it because someone might not need this view.

What do you think?

owenbush’s picture

Thanks for the issue Vlad. I've created a new issue for this.

#3296278: Registration View Local Tasks Use The Wrong View Name