ConfigEntityBase: fix computation of config schema name when "getConfigDependencyName()" is overridden.

Created on 24 November 2016, over 7 years ago
Updated 30 January 2023, over 1 year ago

Problem/Motivation

Configuration entities defines the config_prefix which is used for schema describing. For instance, prefix of \Drupal\taxonomy\Entity\Vocabulary is vocabulary and schema with the taxonomy.vocabulary.*: name will be used for storing the data. If \Drupal\taxonomy\Entity\Vocabulary class will implement the getConfigDependencyName() method which returns 'taxonomy.TEST.' . $this->id(), then toArray() method of \Drupal\Core\Config\Entity\ConfigEntityBase will ignore this change.

Proposed resolution

  1. Use $this->getConfigDependencyName() instead of $entity_type->getConfigPrefix() . '.' . $this->id() in \Drupal\Core\Config\Entity\ConfigEntityBase::toArray()
  2. Return $this->getEntityType()->getConfigPrefix() . '.' . $this->getConfigTarget() by getConfigDependencyName() of the same class.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
Configuration entityΒ  β†’

Last updated 4 days ago

Created by

πŸ‡ΊπŸ‡¦Ukraine BR0kEN Dnipro

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot β†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

Production build 0.69.0 2024