Missing Use statement \Drupal\Component\Plugin\Derivative\DeriverBase give fatal errir

Created on 12 April 2023, about 1 year ago

Problem/Motivation

While saving any configuration or content on the site cause a fatal error, it seems to happen randomly and upon clearing cache the error do not appear and redirects back the entity page as desired, it is also observed that the entity which was being saved and caused the fatal error to appear gets saved properly.

Steps to reproduce

I guess if you have component module installed and enabled, then try creating any new taxonomy term of any available vocabulary type or try to create a new views page and this fatal error should randomly appear.

Proposed resolution

Upon investigating the code it was found that the class
Drupal\component\Plugin\Derivative\ComponentBlockDeriver
is extending the drupal code
\Drupal\Component\Plugin\Derivative\DeriverBase
but it is missing from the files use statement, so adding
use \Drupal\Component\Plugin\Derivative\DeriverBase;
to the file component/src/Plugin/Derivative/ComponentBlockDeriver.php should resolve this error.

🐛 Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇮🇳India tdnshah

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024