You have requested a non-existent service "daterange_compact.date_range.formatter"

Created on 5 May 2025, 10 days ago

Problem/Motivation

When managing display setttings on a node with recurring events, changing the configuration of other fields might cause this problem:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "daterange_compact.date_range.formatter". Did you mean this: "daterange_compact.formatter"? in Drupal\Component\DependencyInjection\Container->get() (line 157 of /var/www/html/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php).

This is because /recurring_events/src/Plugin/Field/FieldFormatter/EventInstanceDateCompactFormatter.php

does this on line 90

$container->get('daterange_compact.date_range.formatter'),

And according to the formatter module https://www.drupal.org/project/daterange_compact/releases/2.0.0 the service name got changed.

Steps to reproduce

  • Add an entity type with multiple fields, one being dates that are recurring as the last.
  • Try to update display settings of other fields.
  • The UI might report the error.

Proposed resolution

Update the service name being requested.

🐛 Bug report
Status

Active

Version

3.0

Component

Recurring Events (Main module)

Created by

🇨🇷Costa Rica alemadlei

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024