The "required_by_role" plugin does not exist

Created on 27 March 2024, 10 months ago

After uninstall module. It is impossible to remove any other or filed.
Drupal:8.9.20

The website encountered an unexpected error. Please try again later.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "required_by_role" plugin does not exist. Valid plugin IDs for Drupal\required_api\RequiredManager are: default in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @promo-il
  • Issue was unassigned.
  • 🇧🇪Belgium dieterholvoet Brussels

    I can reproduce this by setting up a field to use the 'Required by role' plugin, uninstalling the Required by role module and saving a node with that field.

    I'm not sure what the best way to go would be though. I think the safest may be to fallback to the default behaviour (always required) when the chosen plugin is missing, but log a message to remind the site administrator to reconfigure the field.

    I'm going to move this issue to the Required API module since this is something that needs to be fixed over there.

  • 🇧🇪Belgium dieterholvoet Brussels

    I added the fallback and error log in the MR. What still needs to be done:

    • Show in the field edit form when a non-existing plugin is selected and allow to set back to default or another plugin
    • See what happens when you completely uninstall the Required API module when fields are configured
  • 🇧🇪Belgium dieterholvoet Brussels

    Show in the field edit form when a non-existing plugin is selected and allow to set back to default or another plugin

    Done!

    See what happens when you completely uninstall the Required API module when fields are configured

    The config related to Required API is removed from all fields and those fields are set to be always required. This seems like acceptable behaviour to me.

  • Pipeline finished with Skipped
    about 2 months ago
    #363123
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024