Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298144

After updating `FieldConfig` entities, the old configuration is still being used: discovery bin needs to be manually cleared

$
0
0

Problem/Motivation

While we were writing a test (a functional JS test, not an update path test: this is from \Drupal\Tests\media\FunctionalJavascript\CKEditorIntegrationTest::testDialogAccess()), we noticed that changing a setting on a configurable field did not have any effect:

    // Test that setting the media image field to not display alt field also
    // disables it in the dialog.
    FieldConfig::loadByName('media', 'image', 'field_media_image')
      ->setSetting('alt_field', FALSE);
    ->save();

did not cause the alt setting to be FALSE.

The solution was adding:

  $this->container
      ->get('cache.discovery')
      ->delete('entity_bundle_field_definitions:media:image:en');

See #2994702-92: Allow editors to alter embed-specific metadata, as well as `data-align` and `data-caption`
(comments 92 and 93)

Proposed resolution

Remove the need for

  $this->container
      ->get('cache.discovery')
      ->delete('entity_bundle_field_definitions:media:image:en');

Remaining tasks

TBD

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet


Viewing all articles
Browse latest Browse all 298144

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>