Constantly getting "The website encountered an unexpected error. Please try again later." I wondered if I can get some advice regarding working with Drupal 8. I've tried installation after installation and sooner rather than later I'm effectively bricking the installs by just installing third party modules.

Can someone please advise how I can debug effectively? I'm not a dev but can do some basic dev tasks.

I used to use for Drupal 7 in settings.php:

error_reporting(E_ALL); 
ini_set('display_errors', TRUE); 
ini_set('display_startup_errors', TRUE); 


However, I have no luck with this in Drupal 8.

It's getting incredibly frustrating when trying out new modules for this constantly to be happening.

Log file reads (which I've Googled) prior to asking.


  [proxy_fcgi:error] [pid 15594:tid 139919129229056] [client
  79.70.230.243:47902] AH01071: Got error 'PHP message: Uncaught PHP Exception
  Drupal\Component\Plugin\Exception\PluginNotFoundException: "The
  "file_type" entity type does not exist." at
  core/lib/Drupal/Core/Entity/EntityTypeManager.php line 125\n'


A second site outputs:


  [pid 15594:tid 139919154407168] [client 79.70.230.243:49570] AH01071:
  Got error 'PHP message: Uncaught PHP Exception
  Drupal\Component\Plugin\Exception\PluginNotFoundException: "The
  "file_type" entity type does not exist." at
  core/lib/Drupal/Core/Entity/EntityTypeManager.php line 125\n',
  referer: http://domainname/user/login


Despite me having the above information, I really don't know what is causing this. Furthermore, I never do as reading the log files and following those error messages (like the above ones) doesn't clearly illustrate which module is causing the problem.
That exception is thrown by EntityTypeManager::getDefinition() when it doesn't find any definition for the entity with the ID passed as argument.

  if (($entity_type = parent::getDefinition($entity_type_id, FALSE)) &amp;&amp; class_exists($entity_type-&gt;getClass())) {
    return $entity_type;
  }
  elseif (!$exception_on_invalid) {
    return NULL;
  }

  throw new PluginNotFoundException($entity_type_id, sprintf('The "%s" entity type does not exist.', $entity_type_id));


The ID of that entity could confuse: It's not the File entity Drupal core implements because its ID would be file, not file_type. That is the entity defined from the File Entity (fieldable files) project, in its FileType.php file.

I take you installed the module, and uninstalled it, but your site still have some instances of that configuration entity. I would try cleaning Drupal cache, and if that doesn't work, I would re-install the module, go to /admin/structure/file-types, delete any entity listed there, and uninstall the module again.