0

I'm using Drupal 9.3.11 on PHP 7.3. Site is running perfectly. I need upgrade to PHP 8, but I am getting this error.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist. Valid plugin IDs for Drupal\Core\ImageToolkit\ImageToolkitManager are: gd in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core\lib\Drupal\Component\Plugin\Discovery\DiscoveryTrait.php).

Drupal\Core\Plugin\DefaultPluginManager->getDefinition(NULL) (Line: 102)
Drupal\Core\Image\ImageFactory->getSupportedExtensions() (Line: 386)
Drupal\image\Entity\ImageStyle->supportsUri('public://slider-front/slider_novo_site.jpg') (Line: 274)
template_preprocess_image_style(Array, 'image_style', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('image_style', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 50)
__TwigTemplate_ff68c0131a8924feadb3a658b99a0e39b60fe7e6871ff9c20fd45f0a1c6eddd2->doDisplay(Array, Array) (Line: 405)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
Twig\Template->display(Array) (Line: 390)
Twig\Template->render(Array) (Line: 55)
twig_render_template('themes/bootstrap_barrio/templates/field/image-formatter.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('image_formatter', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 934)
Drupal\views\Plugin\views\field\EntityField->render_item(0, Array) (Line: 1168)
Drupal\views\Plugin\views\field\FieldPluginBase->advancedRender(Object) (Line: 238)
template_preprocess_views_view_field(Array, 'views_view_field', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('views_view_field', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 1745)
Drupal\views\Plugin\views\field\FieldPluginBase->theme(Object) (Line: 779)
Drupal\views\Plugin\views\style\StylePluginBase->elementPreRenderRow(Array) call_user_func_array(Array, Array) (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 772)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 363)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 718)
Drupal\views\Plugin\views\style\StylePluginBase->renderFields(Array) (Line: 584)
Drupal\views\Plugin\views\style\StylePluginBase->renderGrouping(Array, Array) (Line: 38)
Drupal\slick_views\Plugin\views\style\SlickViews->render(Array) (Line: 2170)
Drupal\views\Plugin\views\display\DisplayPluginBase->render() (Line: 1533)
Drupal\views\ViewExecutable->render() (Line: 131)
Drupal\views\Plugin\views\display\Block->execute() (Line: 1630)
Drupal\views\ViewExecutable->executeDisplay('block_1', Array) (Line: 81)
Drupal\views\Element\View::preRenderViewElement(Array) (Line: 59)
Drupal\views\Plugin\Block\ViewsBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender(Array)
call_user_func_array(Array, Array) (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 772)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 363)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 65)
__TwigTemplate_7a1eb4fdd27d5860cb55c9b00c20aed750382ae62ea6694627bee55885014fbc->doDisplay(Array, Array) (Line: 405)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
Twig\Template->display(Array) (Line: 390)
Twig\Template->render(Array) (Line: 55)
twig_render_template('themes/bootstrap_barrio/templates/layout/page.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 84)
__TwigTemplate_31a2a24787fe3ae65266581f36c28768a486bdf9651fc0c4f5454cf5c1711248->doDisplay(Array, Array) (Line: 405)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
Twig\Template->display(Array) (Line: 390)
Twig\Template->render(Array) (Line: 55)
twig_render_template('themes/bootstrap_barrio/templates/layout/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 162)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 163)
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: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Although version 7.3 works perfectly, the status report contains the following:

enter image description here

9
  • Did you check the Status Report for any complaints Drupal might have about the new PHP package, specifically the Image Toolkit?
    – 4uk4
    Apr 18 at 16:32
  • @4uk4 thanks for your contribuition, but, I'm not found any problem about it.
    – vctlzac
    Apr 18 at 18:32
  • You need to install the same PHP extensions for the new version as were available in the old (or at least the ones relevant to Drupal). For GD, for example, that might be apt install php8.0-gd on Ubuntu with the ondrej/php PPA. You may also be missing zip, xml, curl, mbstring, and others
    – Clive
    Apr 18 at 20:13
  • If the GD extension or any required extension isn't installed, the status report complains with a Drupal requires you to enable the PHP extensions in the following list error.
    – apaderno
    Apr 18 at 21:10
  • There are two errors: one is about the image toolkit plugin with an empty ID, the other one is about a #pre_render callback with a wrong value.
    – apaderno
    Apr 18 at 21:18

1 Answer 1

0

In php.ini (version 7), gd extension is enable with following code:

extension=gd2

But, in php.ini of PHP 8 version, command extension=gd2 not working. Correct command is:

extension=gd

I was trying to use version 7 command in version 8. I remove "2" character and problem solved.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.