- Issue created by @kc tang
- Status changed to Postponed: needs info
8 months ago 9:39pm 14 April 2024 - 🇭🇰Hong Kong kc tang
Apart from using composer update, i have not made any changes to the existing modules or themes. I use composer update rather closely whenever I am informed to do an update. I have not written down the updates made by composer update since 7 April 2024.
After the last report, I restore both the website and the database from the backups on 7 April 2024. It is working now, but I dare not do a composer update now to risk causing the errors again.
In the meantime, I hope that there can be a solution. Alternatively, direct me how to record the matters changed by composer update, and I may do a composer update to check.
What did Composer update? The command produces output. There isn’t much to go on here, except to say that it looks like a class file is missing.
- 🇵🇱Poland peszek07
I ran into the same problem. I have already deleted the vendor web/core web/modules/contrib directories and downloaded them again with composer. The problem only occurs on the server. I downloaded all the files and the database to the local environment and the problem does not occur. Looks more like an environment/PHP issue. I'm using PHP8.3.6(debian) on the server and PHP8.6.2(ddev on ubuntu) locally.
- 🇭🇰Hong Kong kc tang
Hello cilefen,
1. I did not record what "composer update" had updated before the problem arose. I may only tell when I do another composer update.
2. The restore using the 7 April 2024 backups let the webpages show up without errors. Only when I use the Admin functions that the errors appear again. Therefore, the errors might already have been there but to a lesser extent.
3. I therefore will do a "composer update" or make major removal and installation during the week end when the webpages are not in use.Hello peszek07,
Would you please advise exactly which directories I should delete? My root folder is "web". Did you mean "web/vendor", "web/core" and "web/modules/contrib". I find that they have many files other than those used by modules. Is it alright to delete them all? Should I just use "rm -r" to remove? What commands should I use to download and install them back?
- 🇵🇱Poland peszek07
If you have properly installed Drupal via composer you can delete vendor web/core web/modules/contrib. Those directories should be in .gitignore file too, because they are downloaded via composer. But this didn't the problem for me. I still have WSOD(saying plugin not found) on every page of my drupal installation.
@KC Tang Does file `core/modules/media/src/Plugin/media/Source/AudioFile.php` exist in that Drupal codebase?
- 🇵🇱Poland peszek07
A very strange situation, today after composer update and clearing the cache everything was back to normal.
No packages have been updated with composer or custom code.
I've done it probably 50 times in the previous days, but only today it started working. - 🇵🇱Poland peszek07
A very strange situation, today after composer update and clearing the cache everything was back to normal.
No packages have been updated with composer or custom code.
I've done it probably 50 times in the previous days, but only today it started working. - 🇭🇰Hong Kong kc tang
@cilefen
The Audio.php file is there. All the php files there are dated April 3 15:19. - 🇭🇰Hong Kong kc tang
No luck! I have removed web/core, web/vendor and web/modules/contrib, and used composer update to install them back, but similar error messages appear. This time: "The "text_default" plugin does not exist."
I now have to restore the web folders and database again. Hope that it can come up for service until the real fix.
Was the
core/modules/text/src/Plugin/Field/FieldFormatter/TextDefaultFormatter.php
file present when that error abouttext_default
occurred?The "Needs steps to reproduce" remains on this bug report. At this time there is no technical clarity as to the immediate cause of the bug. We need, for example, the answer to the question in comment #2 to make some progress here, as this is reported as a regression.
Did anything about the server or hosting platform change in the timeline of when the bug appeared?
- 🇭🇰Hong Kong kc tang
The file core/modules/text/src/Plugin/Field/FieldFormatter/TextDefaultFormatter.php was present.
The first error occurred when I used ICME to add images. It said that access was forbidden. After I used composer update, drush updatedb and drush cr in an attempt to rectify, the "plugin does not exist" message appeared with no access to any page.
I restored the web files and database once without doing compose update. It was fine but when I used some admin functions, the "plugin does not exist" message appeared again. Luckily, the main pages were still OK.
When I run composer update, drush updatedb and drush cr, the "plugin does not exist" message appeared with no access to any page.
The image below captured the updates made by composer update. Hope that this is useful.
I have exhausted all the remedial methods found on internet talking about missing plugins. I am now planning to install a fresh Drupal and import the existing files.
Have you at any time restarted the web server (and PHP, if this is an FPM setup) during this?
- 🇭🇰Hong Kong kc tang
This is how I resolved the issues:
Copied the database to a different name.
Copied the web files to a directory of different name.
Edited the sites/default/settings.php under the new directory to change the database name to the new one.
Interchanged the old and new directory names to carry out testing.[interchanged just in case I need to go back to use the original web files.]
[Luckily, I could access admin > Reports > status report this time.]Updated the following reported to have been outdated:
ckeditor5 Fullscreen 1.0.0-beta7 -> 1.0.0-beta8
token 8x-1.13 -> 8x-1.14
insert 3.0.0-beta6 -> 3.0.0-beta6
drupal/core 10.2.4 -> 10.2.5[There was User warning: mkdir(): Permission Denied in Drupal\Component\PhpStorage\FileStorage->createDirectory() (line 123 of core/lib/Drupal/Component/PhpStorage/FileStorage.php). Error because my user name was used as the owner when I copied the file, though I used cp -Rav.]
Changed owner of site/default/files to www-data:www-data.
[So far so good.]
Executed composer update -W.
[A lot of files updated. Error reported: failed to audit installed packages]
Executed composer audit.
[Message: The "https://packagist.org/api/security-advisories/" file could not be downloaded (HTTP/2 502 )]
Tried to follow the composer audit instructions to rectify, but gave up.
[Too complicated for me.]
Executed composer update --no-update.
[Message: https://repo.packagist.org could not be fully loaded (The "https://repo.packagist.org/p2/drupal/book_link_weight.json" file could not be downloaded (HTTP/2 502 )), package information was loaded from the local cache and may be out of date]
[Yet Website OK except that node_revision_delete and node_revision_generate were reported missing.]
[Able to composer require drupal/node_revision_delete.]
[Appeared to be able to composer require drupal/node_revision_generate (probably from cache), but could not actually install it. In fact, www.drupal.org no longer provide this module!]
Executed drush updatedb.
Messages: ---------------------- ----------- --------------- -------------------------- Module Update ID Type Description ---------------------- ----------- --------------- -------------------------- node_revision_delete 9002 hook_update_n 9002 - Add config option to disable automatic queueing. ---------------------- ----------- --------------- -------------------------- Do you wish to run the specified pending updates? (yes/no) [yes]: > yes [notice] Module node_revision_generate has an entry in the system.schema key/value storage, but is missing from your site. <a href="https://www.drupal.org/node/3137656">More information about this error</a>.
Read read https://www.drupal.org/docs/updating-drupal/troubleshooting-database-upd... →
[Too complicated for me. I just did the next.]
Executed drush cedit core.extension to remove the entry of node_revision_generate but without success when saving. The edited file reinstated automatically.
Executed drush cr.
[Website fine except for the missing node_revision_generate message.]
[Had tried during the course on the original web files. Able to access Admin > Extend > Update. Only ckeditor5 Fullscreen and token were reported outdated. Not the insert module. node_revision_delete and node_revision_generate were reported as present. However, the "plugin does not exist" errors still existed. I therefore gave up and went back to use the new pair of web files and database.]
Now I suspect that the issues have all along been due to the outdating and disappearance from downloading of node_revision_generate. On the other hand, I am not sure why node_revision_delete and node_revision_generate were reported as missing in my copied web files. But the missing might have helped me resolve the issue.
The inability to fully download from //https://repo.packagist.org, and the missing node_revision_generate do not affect the use and display of the web pages, and can be tolerated for the time being.
I would now request assistance on:
1. how to remove node_revision_generate; and
2. how to rectify the inability to fully download from https://repo.packagist.org (this may as well be due to the outdated and absent node_revision_generate). - Status changed to Active
8 months ago 10:02pm 19 April 2024 - 🇭🇰Hong Kong kc tang
Removal of node_revision_generate resolved here:
https://www.drupal.org/project/node_revision_delete/issues/3442187 💬 How to gracefully composer remove drupal/node_revision_generate Active
Inability to download did not appear.
- 🇺🇸United States dane powell
I'm suffering this issue as well as of a week or two ago. Overnight and without any changes that I'm aware of, I started getting these plugin errors.
I suspect it's actually a Composer issue: https://github.com/composer/composer/issues/11982
Notice that the list of valid plugins is empty. This suggests an autoloading issue, i.e., Drupal doesn't see any plugins at all. This led me to look at Composer and I noticed that autoload_static.php is practically empty when it should be about a megabyte in size.
- 🇺🇸United States dane powell
Sorry, I think the composer lead was a red herring. I tried everything I can think of to troubleshoot this, and today for whatever reason my site just started working again. Spooky.
- 🇭🇰Hong Kong kc tang
The same problem arose again today after I did a "composer update" today when only the following two were automatically updated:
phpstan/phpstan 1.11.1
phpstan/phpstan-deprecation-rules 1.2.0I have subsequently restored both the database and the web files. Only a few pages can display properly. The majority have the Plugin not found problem!!! The problem may have existed before today's "composer update".
The error messages can be:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "text_default" plugin does not exist. Valid plugin IDs for Drupal\Core\Field\FormatterPluginManager are: in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "block_page" plugin does not exist. Valid plugin IDs for Drupal\Core\Display\VariantManager are: in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Help!
- 🇭🇰Hong Kong kc tang
I have just done the following to re-display my web pages:
composer remove drupal/*
composer require drupal/core
drush updatedb [answering "yes' when answering warning that some modules marked as installed in the core.extension is missing.]
drush cr
composer require drupal/bartik [I am using bartik theme]
drush updatedb
drush cr
https:// [an error message was displayed saying that photo_image plugin was missing]
composer require drupal/photos
drush updatedb
drush cr
https:// [the web pages are displayed with no error but the setting was not fully as previously defined]
log in as an administrator
check Admin > Manage > Reports > Status report [to find errors that I had to deal with, basically missing or invalid modules that I have to install back]That is it for now. At least I have a working web site! I will continue to do the rest.
- 🇺🇸United States dane powell
Interesting. I think it was also a composer update that killed my site. Considering that your only package updates weren't Drupal-related, I do wonder if this is a bug with Composer not generating autoload files as expected.
If you commit your vendor dependencies to Git (such as in a build artifact), try doing a diff to see what, if anything, changed between the working and non-working versions of the site.
- 🇭🇰Hong Kong kc tang
All the modules and themes have been reinstalled now.
Have to do it one by one or group by group with drush updatedb and drush cr executed frequently to monitor the status.
A module could not be installed. It has to be removed and installed several times to be successful.
Some modules did not perform as expected probably because some related modules should be installed earlier.
- 🇺🇸United States phl3tch
We have a command line installer we use to automate Drupal installations. It has a composer manifest with all the modules and themes we require, and the installer basically just runs composer commands to install all that stuff and then drush site-install. The composer constraints specify the latest version of Drupal. A couple weeks ago it started throwing this error (with the text_default plugin specifically) in the profile installation phase, even though we've made no changes to the profile we use. All I've been able to determine is that there are configs it's trying to install that have this key and that the module installer is showing text_default isn't there. The installer bails at this point but the sites appear to install properly none the less.
- 🇭🇰Hong Kong kc tang
Similar errors arose again after a "composer update" followed by successful "drush updatedb" and "drush cr" today!
The website encountered an unexpected error. Try again later. Drupal\Component\Plugin\Exception\PluginNotFoundException: The "text_default" plugin does not exist. Valid plugin IDs for Drupal\Core\Field\FormatterPluginManager are: in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
The update had updated "drupal/core" and a few others -- not recorded.
When I repeated updatedb, cr and cr, the following happened:
:/var/www/html/web$drush updatedb [success] No pending updates. :/var/www/html/web$drush cr [success] Cache rebuild complete. :/var/www/html/web$drush cr In DiscoveryTrait.php line 53: The "field_item:string_long" plugin does not exist. Valid plugin IDs for Dr upal\Core\TypedData\TypedDataManager are: :/var/www/html/web$drush cr In DiscoveryTrait.php line 53: The "field_item:string_long" plugin does not exist. Valid plugin IDs for Dr upal\Core\TypedData\TypedDataManager are: :/var/www/html/web$drush cr [success] Cache rebuild complete.
The error message on web still appeared.
Does it mean that I have to repeat the repair 22 days ago!
- 🇭🇰Hong Kong kc tang
The "composer update" today has done the following:
:/var/www/html/web$ composer update The "grasmash/composerize-drupal" plugin (installed globally) was skipped because it requires a Plugin API version ("^1.0.0") that does not match your Composer installation ("2.6.0"). You may need to run composer update with the "--no-plugins" option. Loading composer repositories with package information Updating dependencies Lock file operations: 0 installs, 3 updates, 0 removals - Upgrading drupal/core (10.2.6 => 10.2.7) - Upgrading drupal/imce (3.0.12 => 3.1.0) - Upgrading psy/psysh (v0.12.3 => v0.12.4) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 0 installs, 3 updates, 0 removals - Downloading drupal/core (10.2.7) - Downloading drupal/imce (3.1.0) - Downloading psy/psysh (v0.12.4) - Upgrading drupal/core (10.2.6 => 10.2.7): Extracting archive - Upgrading drupal/imce (3.0.12 => 3.1.0): Extracting archive - Upgrading psy/psysh (v0.12.3 => v0.12.4): Extracting archive Generating autoload files 44 packages you are using are looking for funding. Use the `composer fund` command to find out more! No security vulnerability advisories found.
After reporting in the above message, I have tried "composer update --no-plugins" which has updated some modules differently. 'drush updatedb" and "drush cr" gave different errors. "composer update" again still could not repair the web:
:/var/www/html/web$ composer update --no-plugins Loading composer repositories with package information Updating dependencies Nothing to modify in lock file Installing dependencies from lock file (including require-dev) Package operations: 4 installs, 0 updates, 0 removals - Installing drupal/bartik (1.0.2): Extracting archive - Installing drupal/ckeditor5_page_break (1.1.0): Extracting archive - Installing drupal/node_revision_delete (2.0.0-rc1): Extracting archive - Installing drupal/photos (6.0.7): Extracting archive Generating autoload files 44 packages you are using are looking for funding. Use the `composer fund` command to find out more! No security vulnerability advisories found. :/var/www/html/web$ drush updatedb PHP Warning: Class "Drupal\Core\Http\KernelEvent" not found in /var/www/html/web/vendor/drupal/core/includes/bootstrap.inc on line 134 PHP Fatal error: Uncaught Error: Class "Symfony\Component\EventDispatcher\Event" not found in /var/www/html/web/vendor/drupal/core/lib/Drupal/Component/EventDispatcher/Event.php:15 Stack trace: #0 /var/www/html/web/vendor/composer/ClassLoader.php(576): include() #1 /var/www/html/web/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}() #2 /var/www/html/web/vendor/drupal/core/lib/Drupal/Core/Http/KernelEvent.php(20): Composer\Autoload\ClassLoader->loadClass() #3 /var/www/html/web/vendor/composer/ClassLoader.php(576): include('...') #4 /var/www/html/web/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}() #5 [internal function]: Composer\Autoload\ClassLoader->loadClass() #6 /var/www/html/web/vendor/drupal/core/includes/bootstrap.inc(134): class_alias() #7 /var/www/html/web/vendor/composer/autoload_real.php(45): require('...') #8 /var/www/html/web/vendor/composer/autoload_real.php(49): {closure}() #9 /var/www/html/web/vendor/autoload.php(25): ComposerAutoloaderInitaf101e1b73b0485d45c74ac6ca199284::getLoader() #10 /var/www/html/web/vendor/drush/drush/drush.php(123): include('...') #11 /var/www/html/web/vendor/drush/drush/drush(4): require('...') #12 {main} thrown in /var/www/html/web/vendor/drupal/core/lib/Drupal/Component/EventDispatcher/Event.php on line 15 :/var/www/html/web$ vendor/drush/drush/drush cr PHP Warning: Class "Drupal\Core\Http\KernelEvent" not found in /var/www/html/web/vendor/drupal/core/includes/bootstrap.inc on line 134 PHP Fatal error: Uncaught Error: Class "Symfony\Component\EventDispatcher\Event" not found in /var/www/html/web/vendor/drupal/core/lib/Drupal/Component/EventDispatcher/Event.php:15 Stack trace: #0 /var/www/html/web/vendor/composer/ClassLoader.php(576): include() #1 /var/www/html/web/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}() #2 /var/www/html/web/vendor/drupal/core/lib/Drupal/Core/Http/KernelEvent.php(20): Composer\Autoload\ClassLoader->loadClass() #3 /var/www/html/web/vendor/composer/ClassLoader.php(576): include('...') #4 /var/www/html/web/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}() #5 [internal function]: Composer\Autoload\ClassLoader->loadClass() #6 /var/www/html/web/vendor/drupal/core/includes/bootstrap.inc(134): class_alias() #7 /var/www/html/web/vendor/composer/autoload_real.php(45): require('...') #8 /var/www/html/web/vendor/composer/autoload_real.php(49): {closure}() #9 /var/www/html/web/vendor/autoload.php(25): ComposerAutoloaderInitaf101e1b73b0485d45c74ac6ca199284::getLoader() #10 /var/www/html/web/vendor/drush/drush/drush.php(123): include('...') #11 /var/www/html/web/vendor/drush/drush/drush(4): require('...') #12 {main} thrown in /var/www/html/web/vendor/drupal/core/lib/Drupal/Component/EventDispatcher/Event.php on line 15 :/var/www/html/web$ composer update The "grasmash/composerize-drupal" plugin (installed globally) was skipped because it requires a Plugin API version ("^1.0.0") that does not match your Composer installation ("2.6.0"). You may need to run composer update with the "--no-plugins" option. Loading composer repositories with package information Updating dependencies Nothing to modify in lock file Installing dependencies from lock file (including require-dev) Nothing to install, update or remove Generating autoload files 44 packages you are using are looking for funding. Use the `composer fund` command to find out more! No security vulnerability advisories found. :/var/www/html/web$ vendor/drush/drush/drush updatedb [success] No pending updates. :/var/www/html/web$ vendor/drush/drush/drush cr In DiscoveryTrait.php line 53: The "field_item:string_long" plugin does not exist. Valid plugin IDs for Dr upal\Core\TypedData\TypedDataManager are: :/var/www/html/web$ vendor/drush/drush/drush cr [success] Cache rebuild complete.
- 🇭🇰Hong Kong kc tang
The repair method as said in my message #21 did not work this time. I had to restore the pair of database and web files backed up a few days ago. The web pages can now show up. The Drupal core is 10.2.6.
But:
When accessing Admin > Reports > Status report, the following error message appears:
The website encountered an unexpected error. Try again later. Drupal\Component\Plugin\Exception\PluginNotFoundException: The "audio_file" plugin does not exist. Valid plugin IDs for Drupal\media\MediaSourceManager are: photos in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
When accessing Admin > Reports > Recent log messages, the following error message appears:
Message:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "audio_file" plugin does not exist. Valid plugin IDs for Drupal\media\MediaSourceManager are: photos in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Backtrace:
#0 /var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(25): Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() #1 /var/www/html/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(16): Drupal\Core\Plugin\DefaultPluginManager->getDefinition() #2 /var/www/html/web/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance() #3 /var/www/html/web/core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php(62): Drupal\Component\Plugin\PluginManagerBase->createInstance() #4 /var/www/html/web/core/lib/Drupal/Component/Plugin/LazyPluginCollection.php(80): Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin() #5 /var/www/html/web/core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php(83): Drupal\Component\Plugin\LazyPluginCollection->get() #6 /var/www/html/web/core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php(99): Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->setConfiguration() #7 /var/www/html/web/core/lib/Drupal/Core/Plugin/DefaultSingleLazyPluginCollection.php(55): Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->addInstanceId() #8 /var/www/html/web/core/modules/media/src/Entity/MediaType.php(203): Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->__construct() #9 /var/www/html/web/core/modules/media/src/Entity/MediaType.php(192): Drupal\media\Entity\MediaType->sourcePluginCollection() #10 /var/www/html/web/core/modules/media/media.install(92): Drupal\media\Entity\MediaType->getSource() #11 [internal function]: {closure}() #12 /var/www/html/web/core/modules/media/media.install(91): array_filter() #13 [internal function]: media_requirements() #14 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(409): call_user_func_array() #15 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(388): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() #16 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(408): Drupal\Core\Extension\ModuleHandler->invokeAllWith() #17 /var/www/html/web/core/modules/system/src/SystemManager.php(109): Drupal\Core\Extension\ModuleHandler->invokeAll() #18 /var/www/html/web/core/modules/system/src/Controller/SystemInfoController.php(53): Drupal\system\SystemManager->listRequirements() #19 [internal function]: Drupal\system\Controller\SystemInfoController->status() #20 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array() #21 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #22 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext() #23 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() #24 /var/www/html/web/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #25 /var/www/html/web/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #26 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle() #27 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle() #28 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle() #29 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle() #30 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle() #31 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass() #32 /var/www/html/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle() #33 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle() #34 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() #35 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() #36 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle() #37 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle() #38 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle() #39 {main}
I dare not run drush updatedb or drush cr because I did run them once and the whole web site was giving varying kinds of plugin not found errors (like before which triggered this series of issue), and the web pages could not be accessed again!
I have re-done the restore and keep it for use temporarily until some clue is given to solve the problem. Any help?
--no-plugins
is not a good idea. You have very old Composer plugins installed globally which you should remove. Consult Composer’s documentation for information.At this time you should post the composer.json file here to solve the mystery.
- 🇭🇰Hong Kong kc tang
My composer.json:
{
"name": "drupal/legacy-project",
"description": "Project template for Drupal 9 projects with composer following drupal/drupal layout",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": " https://www.drupal.org/project/drupal → ",
"support": {
"docs": " https://www.drupal.org/docs/user_guide/en/index.html → ",
"chat": " https://www.drupal.org/node/314178 → "
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"composer/installers": "^1.9",
"drupal/back_to_top_with_pi": "^1.0",
"drupal/bartik": "^1.0",
"drupal/book_tree_menu": "^2.0",
"drupal/chunker": "^2.0@alpha",
"drupal/ckeditor5_findandreplace": "^1.1",
"drupal/ckeditor5_fullscreen": "^1.0@beta",
"drupal/ckeditor5_highlight": "^1.1@RC",
"drupal/ckeditor5_media_embed": "^1.0@beta",
"drupal/ckeditor5_page_break": "^1.1",
"drupal/ckeditor5_show_block": "^1.12",
"drupal/classy": "^1.0",
"drupal/color": "^1.0",
"drupal/colorbox": "^2.0",
"drupal/convert_bundles": "^2.0@beta",
"drupal/core": "^10.2",
"drupal/entity_reference_revisions": "^1.11",
"drupal/font_resize": "^9.0",
"drupal/gdoc_field": "^1.4",
"drupal/imce": "^3.0",
"drupal/insert": "^3.0@beta",
"drupal/jquery_ui": "^1.6",
"drupal/jquery_ui_effects": "^2.0",
"drupal/node_revision_delete": "^2.0@RC",
"drupal/pathauto": "^1.12",
"drupal/pdf": "^1.2",
"drupal/pdf_reader": "^1.1",
"drupal/photos": "^6.0",
"drupal/quick_node_clone": "^1.18",
"drupal/stable": "^2.0",
"drupal/toc_api": "^1.4",
"drupal/view_unpublished": "^1.2",
"drush/drush": "^12.4",
"roave/better-reflection": "^6.9"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"drupal/core-vendor-hardening": true
}
},
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "./"
}
},
"installer-paths": {
"core": [
"type:drupal-core"
],
"libraries/{$name}": [
"type:drupal-library"
],
"modules/contrib/{$name}": [
"type:drupal-module"
],
"profiles/contrib/{$name}": [
"type:drupal-profile"
],
"themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
],
"modules/custom/{$name}": [
"type:drupal-custom-module"
],
"profiles/custom/{$name}": [
"type:drupal-custom-profile"
],
"themes/custom/{$name}": [
"type:drupal-custom-theme"
]
},
"drupal-core-project-message": {
"include-keys": [
"homepage",
"support"
],
"post-create-project-cmd-message": [
" ",
" Congratulations, you’ve installed the Drupal codebase ",
" from the drupal/legacy-project template! ",
" ",
"",
"Next steps:",
" * Install the site: https://www.drupal.org/docs/8/install → ",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html → ",
" * Get support: https://www.drupal.org/support → ",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved → ",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
}
}
} - 🇭🇰Hong Kong kc tang
After the long wait after restoring the database and web files 14 days ago, and tolerating the error which appears at some Admin menu, I have just executed: composer update, drush updatedb and drush cr. The web is now fine with no errors appearing.
When executing drush updatedb, there were prompts for accepting a number of post update corrections.
I think the problem was that bugs were introduced with the previous "composer update" more than 14 days ago. After the passage of time without changing my website, the bugs have been corrected by the providers of the modules in question.
Time has been wasted to resolve unsuccessfully on my own!
- 🇺🇸United States dane powell
Has anyone figured out how to recover from this? It just took down another one of my sites. Everything was working, I made a tiny change to a view and saved it, then got the WSOD:
The website encountered an unexpected error. Try again later.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "grid_responsive" plugin does not exist. Valid plugin IDs for Drupal\views\Plugin\ViewsPluginManager are: in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Nothing (drush cr, drush updb, composer update, drush cim / reverting config) makes any difference. The site is just hosed.
- 🇭🇰Hong Kong kc tang
After the successful restoration as said in my message #32 12 days ago, I executed "composer update", "drush updatedb" and "drush cr" a few hours ago without any problems. "drupal/core" was updated from 10.2.x to 10.3.1. One post update correction was required when doing "drush updatedb".
After my message #32, I have installed "drupal/book" as a contributed module, because the last "composer update" said that the "book" core module would be deprecated. Apart from this, I have not made any changes after my messages #30 and 32.
To recap, I just restored the pair of database and web files, and waited for 2 weeks till the miracle happened in the next "composer update".
You may try some remedial methods used by me before, which were successful once but not all the time.
Of course, if somebody can point out the real bug and tell how to fix, that will be ideal.
- 🇭🇺Hungary czigor
Experiencing this issue. I don't know what triggered it but now I can't get rid of it. The missing plugins it's complaining about is either language-url or block_page.
- 🇭🇺Hungary czigor
What I've found so far is that something goes wrong during the plugin annotation parsing.
When language-url is not found the following happens:- When running
drush cr
the annotation gets parsed inDrupal\Component\Annotation\Doctrine::parse()
. This time the "[#" string gets a correctT_ATTRIBUTE (351)
code which makes the annotation be parsed. Right after this the cache_discovery table contains the correct data for thelanguage_negotiation_plugins
cid. - After this the cache_discovery table is emptied due to clearing the caches).
- After this when I go to any page the plugin definitions are rebuilt. This time the "[#" string gets a
T_COMMENT (387)
code which makes the annotation be skipped. The cache entry will be an empty array.
Not sure yet why the difference is.
- When running
- 🇭🇺Hungary czigor
I just checked the site again and now the bug is gone. I've rebooted my laptop since the last try.
- 🇭🇰Hong Kong kc tang
Congratulations!
Like one of my past cases, the error disappeared after I had tolerated it for some time because it did not affect the front end display. I assume the periodical updates make the correction.
The real cause is still unknown to me.
Nowadays, I am scared everytime when doing composer update, drush updatedb and drush cr hoping that the error would not appear again.
- 🇺🇸United States TolstoyDotCom L.A.
I just ran into this when cloning a 10.3 site. I copied a db dump of the existing site into a new database and truncated the cache tables. It probably didn't help that I was running PHP8.2, but after switching to PHP8.3 I got this error.
I resolved it by running
drush eval "drupal_flush_all_caches();"
. However, since this is such a common error perhaps throwing the exception should be made optional, or stopgaps should be used. That might at least keep some sites online while the problem is found.Re #36, I assume that's a reference to
Drupal\Component\Annotation\Doctrine\StaticReflectionParser::parse()
. That usesDoctrine\Common\Annotations\TokenParser
which is basically a wrapper aroundtoken_get_all()
. However, there's an important note in the latter file explaining why they calltoken_get_all()
a second time. Maybe that has something to do with it. Or, maybetoken_get_all()
is getting confused. The next time this happens, maybe someone could test it by adding whitespace before the'#['
of the plugin that isn't being found. Maybe PHP is getting confused by an immediately preceding regular comment or something like that. - 🇩🇪Germany johnnny83
I got the same issue today on core 10.3.6. Before it happened all of a sudden, there was an error when uploading an image in a field with a resolution restriction inside a paragraph. I don't remember the error message, but it was not possible to upload the image. Ususally it should just downsize the file. So I tried resizing the image before uploading it, which was successful, but then it was not scaled down to size set in the respective image style. When trying to open the field options I got the white screen.
drush cr
andupdb
didn't have any effect, so I removed web/core and vendor and reinstalled withcomposer install
. After that everything was working again. - 🇧🇪Belgium dieterholvoet Brussels
I have been encountering this issue as well on a couple projects and it's very weird. It always seems to start after a deploy of new code, which means that a
composer install
happened, possible acomposer update
and also adrush cr
,drush cim
anddrush updb
. It seems like it often happens after having added a core patch or after having updated core in composer.json, and deploying that change. On one project it started happening after deploying a small change to a view. It might also have started happening randomly in the past, although I'm not sure about that.(Temporarily) solving the issue is hard. I feel like in general, cache rebuilds don't help. In the past I also tried clearing the
cache_discovery
table manually and doing a cache rebuild after, but that didn't help either. What seems to help the most is doing a full server restart, followed by a cache rebuild. But even that doesn't fix it every time, sometimes multiple server restart / cache rebuild combinations need to happen for the issue to really be fixed. And even then, it's only a matter of time before it reappears again.A couple weeks ago the issue happened on someone's local ddev installation. Cache rebuilds didn't fix the issue for them. They sent me a database dump, I did one cache rebuild and it was fixed on my machine. They had to restart their server and do a cache rebuild to fix the issue. This makes me believe that the issue isn't linked to the database, but maybe to some kind of server state. OPcache maybe? Maybe this issue is related? ✨ "Clear all caches" should also reset OpCache Active The problems people describe over there sound similar.
I have had the issue happen with Drupal 10.2 and 10.3. Possibly also lower versions, but I can't find any information about that anymore.
I noticed someone linked 🐛 ModuleHandler skips all hook implementations when invoked before the module files have been loaded Needs review . That's a similar issue, but not quite the same: with that issue, plugin types/entity types that are added through (alter) hooks are missing because those hooks aren't being executed. Here, the problem is that the whole plugin (discovery) cache is corrupted. Any plugin type, also the ones being discovered through annotations, is impacted.
- 🇦🇺Australia noonoos
Similar issue here after doing update with the following to my ddev 10.4 site
- Upgrading doctrine/deprecations (1.1.3 => 1.1.4) - Upgrading psy/psysh (v0.12.5 => v0.12.6)
Error messages given are
admin/reports/status or admin/configuration and with php 8.1,8.2,8.3
The website encountered an unexpected error. Try again later. Drupal\Component\Plugin\Exception\PluginException: The plugin (audio_file) did not specify an instance class. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 79 of core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php). Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('audio_file', Array) (Line: 83) Drupal\Component\Plugin\PluginManagerBase->createInstance('audio_file', Array) (Line: 62) Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin('audio_file') (Line: 80) Drupal\Component\Plugin\LazyPluginCollection->get('audio_file') (Line: 88) Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->setConfiguration(Array) (Line: 104) Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->addInstanceId('audio_file', Array) (Line: 55) Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->__construct(Object, 'audio_file', Array) (Line: 204) Drupal\media\Entity\MediaType->sourcePluginCollection() (Line: 193) Drupal\media\Entity\MediaType->getSource() (Line: 93) {closure}(Object) array_filter(Array, Object) (Line: 92) media_requirements('runtime') call_user_func_array(Object, Array) (Line: 416) Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'media') (Line: 395) Drupal\Core\Extension\ModuleHandler->invokeAllWith('requirements', Object) (Line: 415) Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) (Line: 109) Drupal\system\SystemManager->listRequirements() (Line: 53) Drupal\system\Controller\SystemInfoController->status() call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->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: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
going to admin/reports/views_plugins gives these two messages with php 8.1 or 8.2 but not 8.3
Error message Warning: include(/var/www/html/vendor/composer/../doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php): Failed to open stream: No such file or directory in include() (line 576 of /var/www/html/vendor/composer/ClassLoader.php).
Error message Warning: include(): Failed opening '/var/www/html/vendor/composer/../doctrine/deprecations/lib/Doctrine/Deprecations/Deprecation.php' for inclusion (include_path='/var/www/html/vendor/pear/archive_tar:/var/www/html/vendor/pear/console_getopt:/var/www/html/vendor/pear/pear-core-minimal/src:/var/www/html/vendor/pear/pear_exception:.:/usr/share/php') in include() (line 576 of /var/www/html/vendor/composer/ClassLoader.php).
- 🇩🇪Germany johnnny83
After one month the error occured again, but under different circumstances:
I updated core and some modules on a local machine and pushed the changes to the webserver to a staging installation, which is a copy of the production site on the same server. After doingcomposer install
I got this white screen:Error: Call to a member function setFormClass() on null in /xxx/web/core/modules/action/action.module on line 48
The strange thing is, that the error then occured at the same time on the production site, although I haven't changed anything there! After clearing the cache on the production site the error changed to the one we know:
Uncaught PHP Exception Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: "The "text_default" plugin does not exist. Valid plugin IDs for Drupal\\Core\\Field\\FormatterPluginManager are: string" at /xxx/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 53
Clearing the cache again and deleting the vendor and web folders didn't have any effect his time, only after doing a cron run I could access the website again. Although I did the cron only on the production site, the staging site was also accessible again! On both sites I had now the errors attached in the screenshot. After clearing the cache on both sites they finally disappeared.
- 🇦🇺Australia noonoos
My issue has been resolved by downgrading to
composer require doctrine/deprecations:1.1.3
🐛 Class "Doctrine\Deprecations\Deprecation" not found Active
All issues on all versions of php have been resolved. - 🇧🇪Belgium dieterholvoet Brussels
The strange thing is, that the error then occured at the same time on the production site, although I haven't changed anything there!
That confirms my suspicion that this is about something outside the Drupal database, like PHP caches for example.
- 🇺🇸United States TolstoyDotCom L.A.
My suspicion is this is about annotations not being parsed correctly. If this issue happens to anyone else, please test out the suggestion at the end of #39.