I got this error which is kind of surprising to me since I don’t have it on my local environment. What I did is that I compressed the project directory and uploaded it to my cpanel file manager and then extract it. I then imported the sql file to phpmyadmin and made the credential match the ones on my production server.
When I open my site, it was working on the front page and other pages created with the Content type Basic pages. However, when I navigate to /user/login, this error appears. It also appeared on webform pages.
The website encountered an unexpected error. Please try again later.
Error: Class ‘Drupalsimple_sitemapQueueSimpleSitemapQueue’ not found in DrupalComponentDependencyInjectionContainer->createService() (line 262 of core/lib/Drupal/Component/DependencyInjection/Container.php).
DrupalComponentDependencyInjectionContainer->createService(Array, ‘simple_sitemap.queue’) (Line: 176)
DrupalComponentDependencyInjectionContainer->get(‘simple_sitemap.queue’, 1) (Line: 437)
DrupalComponentDependencyInjectionContainer->resolveServicesAndParameters(Array) (Line: 240)
DrupalComponentDependencyInjectionContainer->createService(Array, ‘simple_sitemap.queue_worker’) (Line: 176)
DrupalComponentDependencyInjectionContainer->get(‘simple_sitemap.queue_worker’, 1) (Line: 437)
DrupalComponentDependencyInjectionContainer->resolveServicesAndParameters(Array) (Line: 240)
DrupalComponentDependencyInjectionContainer->createService(Array, ‘simple_sitemap.generator’) (Line: 176)
DrupalComponentDependencyInjectionContainer->get(‘simple_sitemap.generator’, 1) (Line: 437)
DrupalComponentDependencyInjectionContainer->resolveServicesAndParameters(Array) (Line: 240)
DrupalComponentDependencyInjectionContainer->createService(Array, ‘simple_sitemap.form_helper’) (Line: 176)
DrupalComponentDependencyInjectionContainer->get(‘simple_sitemap.form_helper’) (Line: 198)
Drupal::service(‘simple_sitemap.form_helper’) (Line: 43)
simple_sitemap_form_alter(Array, Object, ‘webform_submission_contact_node_25_add_form’) (Line: 539)
DrupalCoreExtensionModuleHandler->alter(‘form’, Array, Object, ‘webform_submission_contact_node_25_add_form’) (Line: 836)
DrupalCoreFormFormBuilder->prepareForm(‘webform_submission_contact_node_25_add_form’, Array, Object) (Line: 279)
DrupalCoreFormFormBuilder->buildForm(Object, Object) (Line: 48)
DrupalCoreEntityEntityFormBuilder->getForm(Object, ‘add’) (Line: 1230)
DrupalwebformEntityWebform->getSubmissionForm() (Line: 18)
DrupalwebformWebformEntityViewBuilder->view(Object, ‘default’) (Line: 165)
Drupalentity_blockPluginBlockEntityBlock->build() (Line: 105)
Drupallayout_builderEventSubscriberBlockComponentRenderArray->onBuildRender(Object, ‘section_component.build.render_array’, Object)
call_user_func(Array, Object, ‘section_component.build.render_array’, Object) (Line: 142)
DrupalComponentEventDispatcherContainerAwareEventDispatcher->dispatch(Object, ‘section_component.build.render_array’) (Line: 90)
Drupallayout_builderSectionComponent->toRenderArray(Array, ) (Line: 86)
Drupallayout_builderSection->toRenderArray(Array) (Line: 317)
Drupallayout_builderEntityLayoutBuilderEntityViewDisplay->buildSections(Object) (Line: 276)
Drupallayout_builderEntityLayoutBuilderEntityViewDisplay->buildMultiple(Array) (Line: 340)
DrupalCoreEntityEntityViewBuilder->buildComponents(Array, Array, Array, ‘full’) (Line: 24)
DrupalnodeNodeViewBuilder->buildComponents(Array, Array, Array, ‘full’) (Line: 282)
DrupalCoreEntityEntityViewBuilder->buildMultiple(Array) (Line: 239)
DrupalCoreEntityEntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 101)
DrupalCoreRenderRenderer->doTrustedCallback(Array, Array, ‘Render #pre_render callbacks must be methods of a class that implements DrupalCoreSecurityTrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725′, ‘exception’, ‘DrupalCoreRenderElementRenderCallbackInterface’) (Line: 786)
DrupalCoreRenderRenderer->doCallback(‘#pre_render’, Array, Array) (Line: 377)
DrupalCoreRenderRenderer->doRender(Array, ) (Line: 201)
DrupalCoreRenderRenderer->render(Array, ) (Line: 241)
DrupalCoreRenderMainContentHtmlRenderer->DrupalCoreRenderMainContent{closure}() (Line: 578)
DrupalCoreRenderRenderer->executeInRenderContext(Object, Object) (Line: 242)
DrupalCoreRenderMainContentHtmlRenderer->prepare(Array, Object, Object) (Line: 132)
DrupalCoreRenderMainContentHtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
DrupalCoreEventSubscriberMainContentViewSubscriber->onViewRenderArray(Object, ‘kernel.view’, Object)
call_user_func(Array, Object, ‘kernel.view’, Object) (Line: 142)
DrupalComponentEventDispatcherContainerAwareEventDispatcher->dispatch(Object, ‘kernel.view’) (Line: 163)
SymfonyComponentHttpKernelHttpKernel->handleRaw(Object, 1) (Line: 80)
SymfonyComponentHttpKernelHttpKernel->handle(Object, 1, 1) (Line: 57)
DrupalCoreStackMiddlewareSession->handle(Object, 1, 1) (Line: 47)
DrupalCoreStackMiddlewareKernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupalpage_cacheStackMiddlewarePageCache->fetch(Object, 1, 1) (Line: 128)
Drupalpage_cacheStackMiddlewarePageCache->lookup(Object, 1, 1) (Line: 82)
Drupalpage_cacheStackMiddlewarePageCache->handle(Object, 1, 1) (Line: 47)
DrupalCoreStackMiddlewareReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
DrupalCoreStackMiddlewareNegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
StackStackedHttpKernel->handle(Object, 1, 1) (Line: 717)
DrupalCoreDrupalKernel->handle(Object) (Line: 19)
I searched and found some articles which says that clearing cache will solve the issue. I cannot login to the interface so I ran /core/rebuild.php but it doesn’t solve it.
When I ran drush cr
on the command line, I got this error.
In EntityResolverManager.php line 128:
Class Drupalsimple_sitemapControllerSimpleSitemapController does not exist
On my local environment I used Lando with Varbase, which is based on Drupal 9.