I have removed a field from a bundle (it is not used somewhere else) by using the graphical UI.
But it is still listed when I run the following command (after cache clear)
What should I do to completely remove it (as I use the previous command to display some list)
edit to add:
Following the proposal of Clive, I ran the
field_cron() without success. Looking at the code of this function, I tried the following code to have more information:
$deleted_fields_repository = \Drupal::service('entity_field.deleted_fields_repository'); $fields = $deleted_fields_repository->getFieldDefinitions(NULL);
As you can imagine,
$fields is empty. Maybe some kind of corruption?
edit to add 2
Following the proposal of 4k4 I ran this code:
$field_storage = \Drupal\field\Entity\FieldStorageConfig::loadByName('node', 'the_field_that_must_be_deleted'); dpm($field_storage->get('persist_with_no_fields'));
And the result is
Thus the question is: how to manually remove a field?