🇭🇰Hong Kong @KC Tang

Account created on 14 May 2015, about 9 years ago
#

Recent comments

🇭🇰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

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?

🇭🇰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

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

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.

🇭🇰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.

🇭🇰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.0

I 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

The last error message also appeared again when I browsed to the edited page.

I executed the following:
drush pmu -y node_revision_delete
drush cex

The error message did not appear again at the Configuration page or the edited page.

Node_revision_delete and node_revision_generate still appeared under Admin > Extend, but unchecked.

I executed composer remove drupal/node_revision_delete.

No more error, but also no more node_revision_delete.

🇭🇰Hong Kong KC Tang

After the above, I edited a page (no 'Create new revision has been checked'). Upon saving, the following error appeared. The saving was not successful.:

The website encountered an unexpected error. Try again later.

TypeError: Drupal\node_revision_delete\NodeRevisionDelete::__construct(): Argument #1 ($entity_type_manager) must be of type Drupal\Core\Entity\EntityTypeManagerInterface, Drupal\Core\Config\ConfigFactory given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\node_revision_delete\NodeRevisionDelete->__construct() (line 61 of modules/contrib/node_revision_delete/src/NodeRevisionDelete.php).

I executed composer remove 'drupal/node_revision_delete'. The following error was reported by the Status report:

The website encountered an unexpected error. Try again later.

Drupal\Core\Extension\Exception\UnknownExtensionException: The module node_revision_delete does not exist or is not installed. in Drupal\Core\Extension\ExtensionList->getExtensionInfo() (line 348 of core/lib/Drupal/Core/Extension/ExtensionList.php).The website encountered an unexpected error. Try again later.
Drupal\Component\Plugin\Exception\PluginException: Plugin (node_revision_delete) instance class "Drupal\node_revision_delete\Plugin\QueueWorker\NodeRevisionDelete" does not exist. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 97 of core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).

I executed composer require 'drupal/node_revision_delete'. No error was reported. But when I edited the page again, the same error appeared again.

I selected Admin > Extend > Note Revision Delete > Configure (I had not configured it after the re-installation pursuant to the above), the following error message appeared:

The website encountered an unexpected error. Try again later.

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "plugin.manager.node_revision_delete". in Drupal\Component\DependencyInjection\Container->get() (line 157 of core/lib/Drupal/Component/DependencyInjection/Container.php).The website encountered an unexpected error. Try again later.

I executed composer require 'drupal/node_revision_delete:^1.0@RC', no error message appeared. node_revision_generate was also back, but I did not select it.

I edited the page again and saved it. No error.

I again selected Admin > Extend > Note Revision Delete > Configure, the following error message appeared:

The website encountered an unexpected error. Try again later.

TypeError: Drupal\node_revision_delete\NodeRevisionDelete::getRelativeTime(): Argument #2 ($number) must be of type int, null given, called in /var/www/html/web/modules/contrib/node_revision_delete/src/NodeRevisionDelete.php on line 429 in Drupal\node_revision_delete\NodeRevisionDelete->getRelativeTime() (line 454 of modules/contrib/node_revision_delete/src/NodeRevisionDelete.php).The website encountered an unexpected error. Try again later.
Drupal\Component\Plugin\Exception\PluginException: Plugin (node_revision_delete) instance class "Drupal\node_revision_delete\Plugin\QueueWorker\NodeRevisionDelete" does not exist. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 97 of core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).

I went back to the edited and saved page, the following error message appeared:

Warning: Undefined array key "minimum_revisions_to_keep" in Drupal\node_revision_delete\Form\AdminSettingsForm->buildForm() (line 154 of modules/contrib/node_revision_delete/src/Form/AdminSettingsForm.php).
Warning: Undefined array key "minimum_age_to_delete" in Drupal\node_revision_delete\Form\AdminSettingsForm->buildForm() (line 157 of modules/contrib/node_revision_delete/src/Form/AdminSettingsForm.php).
Warning: Undefined array key "when_to_delete" in Drupal\node_revision_delete\Form\AdminSettingsForm->buildForm() (line 161 of modules/contrib/node_revision_delete/src/Form/AdminSettingsForm.php).
Warning: Undefined array key "minimum_age_to_delete" in Drupal\node_revision_delete\NodeRevisionDelete->getContentTypeConfigWithRelativeTime() (line 429 of modules/contrib/node_revision_delete/src/NodeRevisionDelete.php).

I left the site on the browser and came back to the page, the above error message did not appear (but appeared later elsewhere as stated below).

I again selected Admin > Extend > Note Revision Delete > Configure, the following slightly different error message appeared:

The website encountered an unexpected error. Try again later.

TypeError: Drupal\node_revision_delete\NodeRevisionDelete::getRelativeTime(): Argument #2 ($number) must be of type int, null given, called in /var/www/html/web/modules/contrib/node_revision_delete/src/NodeRevisionDelete.php on line 429 in Drupal\node_revision_delete\NodeRevisionDelete->getRelativeTime() (line 454 of modules/contrib/node_revision_delete/src/NodeRevisionDelete.php).

I assessed Admin > Configuration, the following error message re-appeared:

Warning: Undefined array key "minimum_revisions_to_keep" in Drupal\node_revision_delete\Form\AdminSettingsForm->buildForm() (line 154 of modules/contrib/node_revision_delete/src/Form/AdminSettingsForm.php).
Warning: Undefined array key "minimum_age_to_delete" in Drupal\node_revision_delete\Form\AdminSettingsForm->buildForm() (line 157 of modules/contrib/node_revision_delete/src/Form/AdminSettingsForm.php).
Warning: Undefined array key "when_to_delete" in Drupal\node_revision_delete\Form\AdminSettingsForm->buildForm() (line 161 of modules/contrib/node_revision_delete/src/Form/AdminSettingsForm.php).
Warning: Undefined array key "minimum_age_to_delete" in Drupal\node_revision_delete\NodeRevisionDelete->getContentTypeConfigWithRelativeTime() (line 429 of modules/contrib/node_revision_delete/src/NodeRevisionDelete.php).

There should be some problem with updating to ^2.0@RC. Downgrading to ^1.0@RC cannot eliminate it.

🇭🇰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.

🇭🇰Hong Kong KC Tang

Done successfully. Thank you!

I had to use "sudo drush cex". Any need to keep the exported .../sync folder?

🇭🇰Hong Kong KC Tang

I do not know exactly how to do with "export the configs".
I have accessed Admin > Configuration > Configuration synchronization > Export > Single item, and found
Configuration type: simple configuration
Configuration name: node_revision_delete.settings
Configuration: disable_automatic_queueing: false
Filename: node_revision_delete.settings.yml

I have done:
composer require 'drupal/node_revision_delete:^1.0@RC'
[no error]
composer remove 'drupal/node_revision_generate'
[no error]
composer require 'drupal/node_revision_delete:^2.0@RC'
[node_revision_generate reported as missing at Status report]
composer remove 'drupal/node_revision_generate'
[no change, same error]
composer remove 'drupal/node_revision_delete"
[node_revision_delete and node_revision_generate reported as missing at Status report]
composer require 'drupal/node_revision_delete:^1.0@RC'
[no error]

So, it means that I have to stay with 'drupal/node_revision_delete:^1.0@RC'.

🇭🇰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).

🇭🇰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.

🇭🇰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.

🇭🇰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

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?

🇭🇰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.

🇭🇰Hong Kong KC Tang

I am using Drupal 10 with CKEditor5. I also thought that the Insert module is compatible with CKEditor5 when it says "3.0.0-beta3 released 1 January 2024 Works with Drupal: ^10". Under the admin/structure/types/manage/book/form-display, the widget setting for the File or Image field does show "Insert" but the Insert menu cannot appear under the text editing screen as usual. Have I missed something or it is really not compatible yet?

Production build 0.69.0 2024