If we use different prefixes we save/get data from different caches.

We need check the way how prefixes are used to get file configurations.
Every entity that is related with entity should have a suffix "."
config_get_storage_names_with_prefix

core/includes/bootstrap.inc:2456:      $language_entities = config_get_storage_names_with_prefix('language.entity');
core/includes/update.inc:1646:      $language_entities = config_get_storage_names_with_prefix('language.entity');
core/modules/image/image.install:260:    foreach (config_get_storage_names_with_prefix($prefix) as $config_id) {
core/modules/rdf/lib/Drupal/rdf/Tests/CrudTest.php:47:    $mapping_config = config_get_storage_names_with_prefix('rdf.mapping');
core/modules/field/field.install:465:  foreach (config_get_storage_names_with_prefix('field.instance') as $config_id) {
core/modules/field/field.install:488:  $config_names = config_get_storage_names_with_prefix('field.field');
CommentFileSizeAuthor
#12 config-prefixes-2162271-interdiff-1-9.txt3.83 KBAnonymous (not verified)
#12 config-prefixes-2162271-9.patch7.5 KBAnonymous (not verified)
#10 config-prefixes-2162271-interdiff-1-9.txt3.83 KBAnonymous (not verified)
#9 config-prefixes-2162271-1.patch3.36 KBAnonymous (not verified)
#9 config-prefixes-2162271-9.patch7.5 KBAnonymous (not verified)
#1 config-prefixes-2162271-1.patch3.36 KBAnonymous (not verified)
Screenshot from 2013-12-24 13:06:25.png98.59 KBAnonymous (not verified)

Comments

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new3.36 KB
Anonymous’s picture

Needs review in cases:
drush cc all
core/update.php
core/rebuild.php

Anonymous’s picture


(10:49:45) chx: likin: $prefix = "field.$type"; line 259
(10:49:54) chx: likin: foreach (config_get_storage_names_with_prefix($prefix) as $config_id) {
...
(11:05:22) chx: core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php
(11:05:23) chx: 745: $ids = config_get_storage_names_with_prefix($config_prefix . '.' . $this->entity_type . '.' . $this->bundle);
...
(11:06:07) chx: likin: core/modules/entity/entity.module is full of this
(11:06:31) chx: likin: http://privatepaste.com/f081d1b26f
...
(11:07:39) chx: likin: look into your config dir. you will see stuff like entity.form_mode.user.register.yml if you list on entity.form_mode.user then say entity.form_mode.userfoo can match
(11:07:48) chx: likin: that's why you need a terminating dot.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

looks good to me.

chx’s picture

Status: Reviewed & tested by the community » Needs work

Erm nope. Most of the ones I listed still need fixing.

xjm’s picture

Status: Needs work » Needs review

1: config-prefixes-2162271-1.patch queued for re-testing.

xjm’s picture

Status: Needs review » Needs work

Sorry, crosspost.

The last submitted patch, 1: config-prefixes-2162271-1.patch, failed testing.

Anonymous’s picture

StatusFileSize
new7.5 KB
new3.36 KB
Anonymous’s picture

StatusFileSize
new3.83 KB
Anonymous’s picture

Anonymous’s picture

Status: Needs work » Needs review
StatusFileSize
new7.5 KB
new3.83 KB
Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

ok, i actually grep'ed this time, and i can't see any more config_get_storage_names_with_prefix() call sites that don't have the trailing '.'.

so, RTBC for reals.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x, though I can definitely see why people miss this.

Seems like we should have a follow-up to see if we can somehow catch this via automated tests when we forget, or at least make sure it's in the documentation under https://drupal.org/node/1667894.

Status: Fixed » Closed (fixed)

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