Score:0

Migrate PHP version - The "" plugin does not exist

in flag

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

4uk4 avatar
cn flag
Did you check the Status Report for any complaints Drupal might have about the new PHP package, specifically the Image Toolkit?
vctlzac avatar
in flag
@4uk4 thanks for your contribuition, but, I'm not found any problem about it.
cn flag
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
apaderno avatar
us flag
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 avatar
us flag
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.
4uk4 avatar
cn flag
Interesting, the second error doesn't seem to stop code execution. It's also not related to the PHP version, this is caused by updating Drupal 8 to 9. So it's not running perfectly with Drupal 9 as the OP says. They should fix this error first and add more info about the PHP 8.0 environment.
vctlzac avatar
in flag
@Clive I'm using XAMPP on windows, after send it to web hosting. The experiences I've had is that usually when installing XAMPP it already contains everything needed to run drupal.
vctlzac avatar
in flag
@Clive The error is not allowing me to access the status report. Looking at the status report in PHP version 7.3, the only error is the one I updated above, in the question. Could the webform error be related?
vctlzac avatar
in flag
I'm using a subtheme created in the barrio. I don't know if that could be a problem either. https://www.drupal.org/project/bootstrap_barrio
Score:0
in flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.