updating a drupal 8.27 instance to drupal 8.3 leads to this error:
RuntimeException: Unable to determine class for field type 'address' found in the 'field.storage.node.field_address' configuration in Drupal\field\FieldStorageConfigStorage->mapFromStorageRecords() (line 157 of core/modules/field/src/FieldStorageConfigStorage.php).
followed by:
Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple(Array) (Line: 242)
Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array) (Line: 507)
Drupal\Core\Entity\Entity::loadMultiple(Array) (Line: 181)
field_entity_field_storage_info(Object)
call_user_func_array('field_entity_field_storage_info', Array) (Line: 391)
Drupal\Core\Extension\ModuleHandler->invoke('field', 'entity_field_storage_info', Array) (Line: 510)
Drupal\Core\Entity\EntityFieldManager->buildFieldStorageDefinitions('node') (Line: 406)
Drupal\Core\Entity\EntityFieldManager->getFieldStorageDefinitions('node') (Line: 154)
Drupal\Core\Entity\EntityManager->getFieldStorageDefinitions('node') (Line: 110)
Drupal\views\EntityViewsData->getFieldStorageDefinitions() (Line: 366)
Drupal\views\EntityViewsData->mapFieldDefinition('node', 'uuid', Object, Object, Array) (Line: 266)
Drupal\views\EntityViewsData->getViewsData() (Line: 16)
Drupal\node\NodeViewsData->getViewsData() (Line: 169)
views_views_data()
call_user_func_array('views_views_data', Array) (Line: 391)
Drupal\Core\Extension\ModuleHandler->invoke('views', 'views_data') (Line: 245)
Drupal\views\ViewsData->getData() (Line: 162)
Drupal\views\ViewsData->get('block_content') (Line: 91)
Drupal\views\Plugin\Derivative\ViewsEntityRow->getDerivativeDefinitions(Array) (Line: 101)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 283)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 174)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 143)
views_theme(Array, 'module', 'views', 'core/modules/views') (Line: 446)
Drupal\Core\Theme\Registry->processExtension(Array, 'views', 'module', 'views', 'core/modules/views') (Line: 333)
Drupal\Core\Theme\Registry->build() (Line: 232)
Drupal\Core\Theme\Registry->get() (Line: 122)
Drupal\Core\Utility\ThemeRegistry->resolveCacheMiss('input') (Line: 113)
Drupal\Core\Utility\ThemeRegistry->get('input') (Line: 185)
Drupal\Core\Theme\ThemeManager->render('input', Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 448)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 149)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 22)
site is unusable. can't get to /admin, /update.php. /rebuild.php brings no improvement.
even deleting /modules/address and renaming node- and node-rev-tables brings no improvement.
playing around with composer remove / update brings no improvement.
i am stuck. don't have any (more) idee how to fix this.
will i have to start build the website from zero, this time without address module?
played with this error now for 3 days, read a lot, nothing helped.
Issue fork address-2868049
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 2868049-unable-to-determine compare
Comments
Comment #2
Berdir> even deleting /modules/address and renaming node- and node-rev-tables brings no improvement.
That is exactly what would cause this, not fix it.
Make sure you have the address module, you can't just remove it. Make sure the file src/Plugin/Field/FieldType/AddressItem.php exists inside it.
Comment #3
Frank Pfabigansrc/Plugin/Field/FieldType/AddressItem.php exists.
Comment #4
chrisrockwell CreditAttribution: chrisrockwell commentedI'm getting the same thing, I'm not sure if it's directly related to address though. I ran
composer update drupal/core --with-dependencies
which upgraded core to 8.3. When I visit the site locally I getFatal error: Call to undefined method Drupal\webprofiler\State\StateWrapper::destruct()
. When I rundrush cr
I get the same error in this issue.I'll try to revert and add more information if I can.
Comment #5
chrisrockwell CreditAttribution: chrisrockwell commentedFYI reverting to 8.2.6 resolved the issue for me. I have to move on for now but I'll try to get back and re-produce.
Comment #6
chrisrockwell CreditAttribution: chrisrockwell commentedFor me, updating to Devel RC1 resolved this issue - not sure why, but I'm all set.
Comment #7
kslagboom CreditAttribution: kslagboom as a volunteer commentedI was able to update from 8.27 Drupal 8.30 using both drush and composer. This was done in a dev environment but I plan to be extra cautious when doing a live site.
Command line:
1. drush pm-update drupal
--this will update drupal core to 8.30 BUT it will break address in the process and spew out error messages when drush tries to apply the 8.30 DB updates.
eg.
2. Next run composer require "drupal/address ~1.0"
--this seems to put all the address stuff back
Site working again. Testing and comparing with source control to see if anything else changed.
Comment #8
kslagboom CreditAttribution: kslagboom as a volunteer commentedFurther, looks like updating Drupal with drush will strip out some vendor folders used by address in the update process--don't understand why this is the case. Composer require drupal/address puts the address specific /vendor stuff back.
Comment #9
BerdirWhen using modules with composer dependencies, it is strongly recommended to stop using drush completely to add modules or update core. Instead, use drupal/core with drupal-project, see https://www.drupal.org/docs/develop/using-composer/using-composer-with-d...
Comment #10
kslagboom CreditAttribution: kslagboom as a volunteer commentedThanks! I have been using drush for so long I never considered that composer was the way to do it.
Comment #11
awasson CreditAttribution: awasson commentedYup busted mine with Drush as well.
Fixed with:
composer require "drupal/address ~1.0"
Thank you @kslagboom on post #7
Comment #12
gandhiano CreditAttribution: gandhiano as a volunteer and commentedI get the same error when trying to upgrade a site from 8.2.8 to 8.3.4. For me this happens in an Aegir environment (i.e. migrate operation from platform on 8.2.8 to 8.3.4). Both have the Address module installed and at the same version. Furthermore, an upgrade from 8.2.1 to 8.2.8 worked before without issues.
Following error appears during block_content_update_8300 and node_update_8301:
Unable to determine class for field type 'address' found in the 'field.storage.node.field_address' configuration
Then later on the process, e.g. by drush_cache_rebuild, the following RuntimeException and backtrace is shown:
Comment #13
gandhiano CreditAttribution: gandhiano as a volunteer and commentedChanging title to better express the issue.
Comment #14
BerdirAs said before, that error means you do *not* have the address files anymore. If you use drush to update and before used composer to add address, then it is gone and you add it again. see my comments above on how to switch to composer completely to avoid that.
Comment #15
gandhiano CreditAttribution: gandhiano as a volunteer and commentedThat is not the case. The files are all there (on both source and destination platforms), and I have exclusively used composer in the process, no drush - but maybe as part of Aegir migration some drush command is run that breaks it?
The problem only happens on an upgrade to 8.3.x
Comment #16
devad CreditAttribution: devad as a volunteer commentedI've made trivial mistake and I got similar error message. Details are here:
#2908112: Unable to determine class for field type
Comment #17
birchy82 CreditAttribution: birchy82 commentedSame error, Drupal is the latest current stable release. It happened when updating drupal to the latest release. I have since uninstalled address hoping it would help with no luck. Tried uninstalling and reinstalling via composer and drush. Nothing seems to work, any help would be greatly appreciated.
Comment #18
Andrew211 CreditAttribution: Andrew211 commentedHi,
Perhaps try "drush updb" if you haven't alraedy.
Cheers
Comment #19
alemilani CreditAttribution: alemilani commentedSame issue after core update, this solution found on the web worked fine for me
composer require "drupal/address ~1.0"
composer update drupal/address --with-dependencies
Comment #20
bojanz CreditAttribution: bojanz at Centarro commentedComment #21
AgentJay CreditAttribution: AgentJay commentedI'm having this issue too.
I'm running the latest stable version of Drupal (8.5.4)
I have tried to add and remove the address module with composer as suggested.
The error persists:
Got error 'PHP message: Uncaught PHP Exception RuntimeException: "Unable to determine class for field type 'address' found in the 'field.storage.node.field_source_address' configuration" at /var/www/vhosts/biopama.org/testdelta.biopama.org/core/modules/field/src/FieldStorageConfigStorage.php line 160\n'
Comment #22
jbfelix CreditAttribution: jbfelix as a volunteer commentedtry drush en address
Comment #23
rrajanuk CreditAttribution: rrajanuk as a volunteer commentedI ran into the same type of runtime exception ---- but with the field type video embed field
Here is the link to more description, Kindly can someone respond to that
https://www.drupal.org/forum/support/upgrading-drupal/2018-11-10/runtime...
Unable to determine class for field type video_embed_field found
in the field.storage.node.field_gallery_videos configuration
in Drupal\field\FieldStorageConfigStorage mapFromStorageRecords()
Comment #24
Summit CreditAttribution: Summit as a volunteer commentedHi,
EDIT: THIS WAS A CACHING PROBLEM. WHEN I EMPTIED THE CACHE-TABLES IN THE DATABASE, PROBLEM WAS GONE.
---
Updating to drupal 9.3.0 I got this same error now. Before on drupal 9.2 I didn't see this error.
I didn't change anything in the content, except upgrading from drupal 9.2 to drupal 9.3.
----
Thanks a lot in advance for your reply!
greetings, Martijn
Comment #25
Baher CreditAttribution: Baher commentedHi I had the same problem
For drupal 9.3.13
You need only to update to the last version of the module
Baher
Comment #26
Summit CreditAttribution: Summit as a volunteer commentedHi,
Having this same fatal error when copying site from localhost to website.
what worked for me was.
Setting $settings['update_free_access'] = true; in settings.php
Running update.php
Setting $settings['update_free_access'] = false; back in settings.php
Site is running again!
Greetings, Martijn
Comment #27
Joran Lafleuriel CreditAttribution: Joran Lafleuriel as a volunteer commentedHi all !
I could repair this kind of error while migrating dp8 to dp9.
That what not about the address field but the integer_range field.
The solution is to remove stuff from configs tables directly in the database.
Here is the fix on drupal.stackexchange that seems to work with any kind of field.
https://drupal.stackexchange.com/questions/246060/runtimeexception-unabl...