After installing the module, the following error is generated on the site

The website encountered an unexpected error. Please try again later.
Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "contact_form" entity type did not specify a access handler. in Drupal\Core\Entity\EntityTypeManager->getHandler() (line 236 of core/lib/Drupal/Core/Entity/EntityTypeManager.php). Drupal\Core\Entity\EntityTypeManager->getAccessControlHandler('contact_form') (Line: 365)

CommentFileSizeAuthor
#3 2980418-3.patch601 bytesmanuel garcia

Comments

markus_petrux created an issue. See original summary.

markus_petrux’s picture

Hi! ...it looks related to this:

/**
 * Implements hook_entity_type_alter().
 */
function contact_permissions_entity_type_alter(array &$entity_types) {
  $entity_types['contact_form']->setHandlerClass('access', 'Drupal\contact_permissions\ContactPermissionsAccessHandler');
}

Drupal\contact_permissions\ContactPermissionsAccessHandler is missing.

manuel garcia’s picture

Status: Active » Needs review
StatusFileSize
new601 bytes

Oh wow, thanks for reporting @markus_petrux!

I believe it is safe to remove the hook. That class is used to control access to edit / delete / view contact form entities. This module only deals with personal contact forms, not general contact form entities, so we do not need to override this access handler.

  • Manuel Garcia committed 4b62bc4 on 8.x-1.x
    Issue #2980418 by Manuel Garcia: InvalidPluginDefinitionException: The "...
manuel garcia’s picture

Status: Needs review » Fixed
manuel garcia’s picture

Status: Fixed » Closed (fixed)

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