Problem/Motivation

Visit /admin/config/development/opentelemetry, get InvalidArgumentException: Missing required data for typed configuration: opentelemetry.settings in Drupal\Core\Config\TypedConfigManager->get() (line 85 of /var/www/drupal/digital/releases/digital-20260226-4/web/core/lib/Drupal/Core/Config/TypedConfigManager.php).

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

jonathan_hunt created an issue. See original summary.

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

nickolaj’s picture

Status: Active » Needs review

Fix: Replace `TypedConfigManager::get()` with `createFromNameAndData()` in `SettingsForm::buildForm()`. The `get()` method throws `InvalidArgumentException` when config data is missing from storage, while `createFromNameAndData()` uses the already-loaded config data directly, avoiding the storage lookup.

murz’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

murz’s picture

Status: Fixed » Closed (fixed)

The solution looks good, but it looks more like a workaround. The actual source of the issue is the missing configuration itself; the configuration should be created during the module install process, and there should be no cases when it can be missing, until something is really broken.

But okay, let's still merge this workaround to prevent fatal errors.