I've just started using the Modal module version 4.1.15 and haven't made any changes to the file structure, now after clearing the cache I get this error:
Error: Class 'Drupal\modal_page\Entity\RouteProvider\ModalHtmlRouteProvider' not found in Drupal\Core\Entity\EntityTypeManager->createHandlerInstance() (line 272 of /var/www/html/core/lib/Drupal/Core/Entity/EntityTypeManager.php)

Is there a new class I need to create to serve a route to the function, or is this an easy fix?

  • Can you confirm the module is actually enabled?
    – cilefen
    Aug 5 at 22:52
  • It does allow itself to be enabled, but gives that same error upon enabling it.
    – Riley Lutz
    Aug 5 at 23:59
  • You don't need to create classes for the module to work. If the module is using a wrong class for an entity handler, that's a bug with the module.
    – apaderno
    Aug 6 at 8:36
  • Actually, the Drupal\modal_page\Entity\RouteProvider\ModalHtmlRouteProvider exists and it's used by the Modal class.
    – apaderno
    Aug 6 at 8:47

1 Answer 1


It seems the RouteProvider folder containing the class I needed was deleted somehow, dropping it back in and clearing the cache fixed the issue.

Not the answer you're looking for? Browse other questions tagged or ask your own question.