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

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Promo-IL created an issue. See original summary.

dieterholvoet’s picture

Project: Required by role » Required API
Version: 8.x-1.2 » 3.0.x-dev
Assigned: promo-il » Unassigned

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.

dieterholvoet’s picture

Status: Active » Needs work

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

dieterholvoet’s picture

Status: Needs work » Needs review

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.

  • dieterholvoet committed 3b4d2a9c on 3.0.x
    Issue #3436602 by dieterholvoet, promo-il: The "required_by_role" plugin...
dieterholvoet’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.