Skip to main content

Unable to determine class for field type '' found in the 'field.field.' configuration

Updated by Tim Rabbetts on
desk, smartphone, iphone

I ran

drush pm:uninstall xmlsitemap

got this error

In FieldConfigStorageBase.php line 31:
                                                                               
  Unable to determine class for field type '' found in the 'field.field.' con  
  figuration                                                                   
           
In DiscoveryTrait.php line 53:
                                                                               
  The "" plugin does not exist. Valid plugin IDs for Drupal\Core\Field\FieldT  
  ypePluginManager are: block_field, comment, datetime, file_uri, file, googl  
  e_map_field, image, link, metatag, list_float, list_integer, list_string, p  
  ath, text_with_summary, text_long, text, webform, decimal, password, float,  
   uuid, string_long, entity_reference, changed, language, map, string, times  
  tamp, uri, integer, created, email, boolean    

Debugged line 31 in /core/lib/Drupal/Core/Field/FieldConfigBase.php

$config_id = $this->getPrefix() . $id;
print '<pre>';
print_r($record);
die();
throw new PluginNotFoundException($record['field_type'], "Unable to determine class for field type '{$record['field_type']}' found in the '$config_id' configuration", $e->getCode(), $e);

from the dump could see the UUID 90bd0956-0e7e-4197-a03b-f3ea625846c1

searched the config folder for this UUID and found it was in file 
config/sync/field.field.node.article.field_image.yml

Checked the content type on the database and this field wasn't there.

Then I execute this SQL:

DELETE FROM cache_config
DELETE FROM config WHERE name = 'field.field.node.article.field_image'
DELETE FROM config_snapshot  WHERE name = 'field.field.node.article.field_image'

After, I execute

drush cex -y

then ran drush pm:uninstall xmlsitemap and it worked yey, untidy database was the problem, hope this helps someone.

Add new comment