Drupal unexpected "Fatal error: Class name must be a valid object or a string [...] common.inc" on every page "Fatal error: Class name must be a valid object or a string in C:\xampp\htdocs\uc\includes\common.inc on line 7506"

The error above showed up unexpectedly. I was adding a "Long text" field to a content-type, but when I expected to be brought to a saved field configuration page, I instead got a Fatal error on every page.

I had a look at includes\common.inc:

/**
 * Get the entity controller class for an entity type.
 */
function entity_get_controller($entity_type) {
  $controllers = &amp;drupal_static(__FUNCTION__, array());
  if (!isset($controllers[$entity_type])) {
    $type_info = entity_get_info($entity_type);
    $class = $type_info['controller class'];
    $controllers[$entity_type] = new $class($entity_type); // Line 7506
  }
  return $controllers[$entity_type];
}


However, I just don't understand Drupal at a low enough level to understand the relationships between these variables and functions.

I also searched Drupal for people with a similar problem:

(1) I found one user who claims that I have to install the submodule "Relation Endpoints Field", but searching Drupal, there doesn't seem to be such a module.

(2) Another user suggested clearing the cache manually:

DELETE FROM cache;
DELETE FROM cache_filter;
DELETE FROM cache_menu;
DELETE FROM cache_page;
DELETE FROM watchdog;


(via WordPress API, misleading name, I know.)

Clearing those tables from the cache did not help.

(3) And another user suggested disabling old modules, specifically the "Old search facets" module. Because I can't find a module specifically pertaining to old search facets, I went into MySQL system table, and marked the Search module's line with a 0 status, indicating to stop loading the module altogether.

On that same link as (3), one user suggested enabling the Database Search Module, so I dropped all the tables, imported the latest stable .sql, and installed the module, but after recreating the problem (trying to add a field to a content-type), that as well concluded fruitless.

Still, the problem remains

The Fatal error shows up on every page, making the site completely non-functional. Any help or direction would be immensely appreciated. Thank you for looking.
The error means that Drupal can't find the entity type information for a entity that it tries to load.

Add var_dump($entity_type); in there and reload the page. The last one that it's going to print (if there are multiple) is the culprit. What you need to do then depends on the entity type. It could for example be that you disabled a module which is still being called.