11

My website got this error, while updating from Drupal 8.3.7 to Drupal 8.4.0, and I am unable to solve it.

The website encountered an unexpected error. Please try again later. RuntimeException: Unable to determine class for field type 'webform' found in the 'field.storage.node.webform' configuration in Drupal\field\FieldStorageConfigStorage->mapFromStorageRecords() (line 157 of core/modules/field/src/FieldStorageConfigStorage.php).

  • I think this is not connected to the D8 version. Probably all versions will report the same error when you have a field configured in a content type where the code for the field type can't be found. – 4k4 Sep 18 '17 at 6:58
37

One possible way is that your module is missing from the codebase or has been improperly uninstalled and you've still a field which is using that missing module.

Try the following drush/SQL commands to remove the broken field:

drush sqlq "DELETE FROM cache_config"
drush sqlq "DELETE FROM config WHERE name = 'field.storage.xxx.xxx' OR data LIKE '%field.storage.xxx.xxx%'"
drush sqlq "DELETE FROM config_snapshot  WHERE name = 'field.storage.xxx.xxx' OR data LIKE '%field.storage.xxx.xxx%'"

Warning: Don't execute above commands on master/live database. Make a backup before doing any database changes.

Where field.storage.xxx.xxx is your reported field storage type (e.g. field.storage.node.webform).

If above won't help, check for any other references by:

drush sql-dump --ordered-dump | grep field.storage.xxx.xxx

At the end you need to rebuild your caches:

drush cr
| improve this answer | |
  • 1
    Thank you very much for the solution. Its surely going to help. – user79200 Sep 23 '17 at 5:38
  • 1
    This should absolutely be the accepted answer – Mrweiner Jan 22 '19 at 22:07
  • Thanks @kenorb for this great answer. +1 – Beto Aveiga Sep 12 '19 at 20:57
2

I had a similar error with another module (address in my case). I could fix it by simply re-install the concerned module with drupal console by the following command:

drupal module:install address

And back to business :)

| improve this answer | |
1

When I see that error my trick is to try enabling the offending module again from the command line and then clearing cache. For example:

lando drush cr                                                                                                                                                                             

In FieldStorageConfigStorage.php line 174:

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


In DiscoveryTrait.php line 53:

  The "simplenews_issue" plugin does not exist. Valid plugin IDs for Drupal\Core\Field\FieldTypePluginManager are: address, address_zone, address_country, comment, datetime, file_uri, file, image, link, list_float, list_string, list_integer, path, text_  
  with_summary, text, text_long, integer, uri, entity_reference, uuid, float, email, timestamp, string, language, created, changed, map, string_long, password, decimal, boolean                                                                               

lando drush en simplenews                                                                                                                                                                 
 [notice] Already enabled: simplenews
lando drush cr                                                                                                                                                                             
 [success] Cache rebuild complete. 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy