Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By ojchris on
On drupal 8 site, I installed a contributed module and then added a field to a content type to test the module. After finding the module wasn't working as expected I decided to uninstall the module. To do that I tried to delete the field I had created, on clicking delete the site has remained inaccessible and displaying only this error:
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">RuntimeException</em>: Unable to determine class for field type 'plugin:currency_amount_formatter' found in the 'field.field.node.hotel_information.field_room_cost_formatted' configuration in <em class="placeholder">Drupal\Core\Field\FieldConfigStorageBase->mapFromStorageRecords()</em> (line <em class="placeholder">28</em> of <em class="placeholder">core\lib\Drupal\Core\Field\FieldConfigStorageBase.php</em>). <pre class="backtrace">Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple(Array) (Line: 292)
Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array) (Line: 541)
Drupal\Core\Entity\EntityBase::loadMultiple(Array) (Line: 202)
field_entity_bundle_field_info(Object, 'hotel_information', Array)
call_user_func_array('field_entity_bundle_field_info', Array) (Line: 392)
Drupal\Core\Extension\ModuleHandler->invoke('field', 'entity_bundle_field_info', Array) (Line: 396)
Drupal\Core\Entity\EntityFieldManager->buildBundleFieldDefinitions('node', 'hotel_information', Array) (Line: 338)
Drupal\Core\Entity\EntityFieldManager->getFieldDefinitions('node', 'hotel_information') (Line: 196)
Drupal\Core\Entity\EntityManager->getFieldDefinitions('node', 'hotel_information') (Line: 260)
views_entity_field_label('node', 'body') (Line: 507)
views_field_default_views_data(Object) (Line: 193)
views_views_data()
call_user_func_array('views_views_data', Array) (Line: 392)
Drupal\Core\Extension\ModuleHandler->invoke('views', 'views_data') (Line: 243)
Drupal\views\ViewsData->getData() (Line: 160)
Drupal\views\ViewsData->get('node_field_data') (Line: 85)
Drupal\views\Plugin\ViewsHandlerManager->getHandler(Array, NULL) (Line: 889)
Drupal\views\Plugin\views\display\DisplayPluginBase->getHandlers('argument') (Line: 115)
Drupal\views\Plugin\Derivative\ViewsBlock->getDerivativeDefinitions(Array) (Line: 101)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 284)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 175)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 22)
Drupal\Core\Plugin\DefaultPluginManager->getDefinition('system_branding_block') (Line: 16)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('system_branding_block', Array) (Line: 76)
Drupal\Component\Plugin\PluginManagerBase->createInstance('system_branding_block', Array) (Line: 62)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin('system_branding_block') (Line: 57)
Drupal\block\BlockPluginCollection->initializePlugin('system_branding_block') (Line: 80)
Drupal\Component\Plugin\LazyPluginCollection->get('system_branding_block') (Line: 45)
Drupal\block\BlockPluginCollection->get('system_branding_block') (Line: 83)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->setConfiguration(Array) (Line: 99)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->addInstanceId('system_branding_block', Array) (Line: 55)
Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->__construct(Object, 'system_branding_block', Array) (Line: 34)
Drupal\block\BlockPluginCollection->__construct(Object, 'system_branding_block', Array, 'aptegy_branding') (Line: 156)
Drupal\block\Entity\Block->getPluginCollection() (Line: 145)
Drupal\block\Entity\Block->getPlugin() (Line: 118)
Drupal\block\BlockAccessControlHandler->checkAccess(Object, 'view', Object) (Line: 105)
Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'view', Object, 1) (Line: 369)
Drupal\Core\Entity\EntityBase->access('view', NULL, 1) (Line: 56)
Drupal\block\BlockRepository->getVisibleBlocksPerRegion(Array) (Line: 137)
Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() (Line: 259)
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)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 2) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 2, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 2, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 2, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 2, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 2, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 2, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 2, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 2) (Line: 166)
Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber->makeSubrequest(Object, '/system/403', 403) (Line: 112)
Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber->on403(Object) (Line: 109)
Drupal\Core\EventSubscriber\HttpExceptionSubscriberBase->onException(Object, 'kernel.exception', Object)
call_user_func(Array, Object, 'kernel.exception', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.exception', Object) (Line: 227)
Symfony\Component\HttpKernel\HttpKernel->handleException(Object, Object, 1) (Line: 79)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
</pre>
Any direction on how to resolve this is appreciated.
Comments
Did you delete the field
Did you delete the field before uninstalling the module?
No I didn't. You can't
I wanted to delete the field before attempting to uninstall. Once I clicked the delete button on the field I got the error and the site has remained like that. So the module is still installed.
Even trying to run clear cache with drush, I get this:
$ drush cr
In FieldConfigStorageBase.php line 28:
Unable to determine class for field type 'plugin:currency_amount_formatter' found in the 'field.field.node.hotel_in
formation.field_room_cost_formatted' configuration
cache:rebuild [--cache-clear [CACHE-CLEAR]] [--no-cache-clear] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--druplicon] [--notify] [--xh-link XH-LINK] [--] <command>