Hi,

I was trying to write some information material about the module. However I'm getting this error in the log:

Error: Class 'Drupal\ds\Ds' not found in fico_entity_view_alter() (line 284 of /var/www/html/field_formatter_condition/web/modules/contrib/fico/fico.module) #0 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(539): fico_entity_view_alter(Array, Object(Drupal\node\Entity\Node), Object(Drupal\Core\Entity\Entity\EntityViewDisplay)) #1 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(308): Drupal\Core\Extension\ModuleHandler->alter('node_view', Array, Object(Drupal\node\Entity\Node), Object(Drupal\Core\Entity\Entity\EntityViewDisplay)) #2 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(242): Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) #3 [internal function]: Drupal\Core\Entity\EntityViewBuilder->build(Array) #4 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/Render/Renderer.php(378): call_user_func(Array, Array) #5 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #6 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(226): Drupal\Core\Render\Renderer->render(Array, false) #7 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() #8 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(227): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #9 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(117): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #10 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #11 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #12 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #13 /var/www/html/field_formatter_condition/vendor/symfony/http-kernel/HttpKernel.php(156): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #14 /var/www/html/field_formatter_condition/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #15 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /var/www/html/field_formatter_condition/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /var/www/html/field_formatter_condition/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /var/www/html/field_formatter_condition/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /var/www/html/field_formatter_condition/web/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /var/www/html/field_formatter_condition/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #24 {main}.

I guess this is some kind of Symfony/PHP magic that is not working right. I'm no programmer and I've never reported an issue, so I hope I'm doing this halfway right. Thanks!

Comments

jorgemontoyab created an issue. See original summary.

d70rr3s’s picture

Hi @jorgemontoyab, is not "magic" is a bug in code since expects another module called Display Suite to be installed in your Drupal. And I mean bug, because neither on the docs or the .info.yml of the Fico module is declared a dependency with Display Suite module which is not core. I'm could provide a patch later to solve this (I'm not the module's maintainer), in the mean time please just install Display Suite following this guide and you will get rid of the error.

d70rr3s’s picture

Status: Active » Closed (duplicate)
Related issues: +#2869343: Add display suite as dependency

Hi @jorgemontoyab, after a quick review of the issues queue of the module a came across with another addressing your same issue and has a working patch. Please follow the link, since I'm closing this as "duplicated".