Cannot uninstall modules anymore Why do I get the following message when trying to uninstall a module with Drupal 8?



The website encountered an unexpected error. Please try again later.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table &amp;#039;pantheon.aggregator_feed&amp;#039; doesn&amp;#039;t exist: SELECT base_table.fid AS fid, base_table.fid AS base_table_fid

FROM
{aggregator_feed} base_table

LIMIT 1 OFFSET 0; Array()
in Drupal\Core\Entity\EntityStorageBase-&amp;gt;hasData()&lt;/em&gt; (line 588 of core/lib/Drupal/Core/Entity/EntityStorageBase.php). 
Drupal\Core\Database\Statement-&amp;gt;execute(Array, Array) (Line: 631)
Drupal\Core\Database\Connection-&amp;gt;query(&amp;#039;SELECT base_table.fid AS fid, base_table.fid AS base_table_fid

FROM
{aggregator_feed} base_table
LIMIT 1 OFFSET 0&amp;#039;, Array, Array) (Line: 358)
Drupal\Core\Database\Driver\mysql\Connection-&amp;gt;query(&amp;#039;SELECT base_table.fid AS fid, base_table.fid AS base_table_fid

FROM
{aggregator_feed} base_table
LIMIT 1 OFFSET 0&amp;#039;, Array, Array) (Line: 510)
Drupal\Core\Database\Query\Select-&amp;gt;execute() (Line: 267)
Drupal\Core\Entity\Query\Sql\Query-&amp;gt;result() (Line: 83)
Drupal\Core\Entity\Query\Sql\Query-&amp;gt;execute() (Line: 588)
Drupal\Core\Entity\EntityStorageBase-&amp;gt;hasData() (Line: 56)
Drupal\Core\Entity\ContentUninstallValidator-&amp;gt;validate(&amp;#039;aggregator&amp;#039;) (Line: 573)
Drupal\Core\Extension\ModuleInstaller-&amp;gt;validateUninstall(Array) (Line: 99)
Drupal\Core\ProxyClass\Extension\ModuleInstaller-&amp;gt;validateUninstall(Array) (Line: 121)
Drupal\system\Form\ModulesUninstallForm-&amp;gt;buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 519)
Drupal\Core\Form\FormBuilder-&amp;gt;retrieveForm(&amp;#039;system_modules_uninstall&amp;#039;, Object) (Line: 276)
Drupal\Core\Form\FormBuilder-&amp;gt;buildForm(Object, Object) (Line: 93)
Drupal\Core\Controller\FormController-&amp;gt;getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&amp;gt;Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer-&amp;gt;executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&amp;gt;wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&amp;gt;Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel-&amp;gt;handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel-&amp;gt;handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session-&amp;gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle-&amp;gt;handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache-&amp;gt;pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache-&amp;gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&amp;gt;handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&amp;gt;handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel-&amp;gt;handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel-&amp;gt;handle(Object) (Line: 19)
As @codesmith mentioned it looks like you have some issue with the Aggregator module but, usually you might also see other problems once you fix the aggregator module issue. The reason you see the issue on aggregator_feed is that it is the first table in your table list. 

In case you are lucky and the issue is only on the aggregator module use the query below to recreate the missing tables (I am providing the two tables that are created when you install aggregator module). 

CREATE TABLE `aggregator_feed` (
`fid` int(10) UNSIGNED NOT NULL,
`uuid` varchar(128) CHARACTER SET ascii NOT NULL,
`langcode` varchar(12) CHARACTER SET ascii NOT NULL,
`title` varchar(255) NOT NULL,
`url` varchar(2048) NOT NULL,
`refresh` int(11) DEFAULT NULL,
`checked` int(11) DEFAULT NULL,
`queued` int(11) NOT NULL,
`link` varchar(2048) DEFAULT NULL,
`description` longtext,
`image` varchar(2048) DEFAULT NULL,
`hash` varchar(255) CHARACTER SET ascii DEFAULT NULL,
`etag` varchar(255) DEFAULT NULL,
`modified` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='The base table for aggregator_feed entities.';


and the second table 

   CREATE TABLE `aggregator_item` (
  `iid` int(10) UNSIGNED NOT NULL,
  `langcode` varchar(12) CHARACTER SET ascii NOT NULL,
  `fid` int(10) UNSIGNED DEFAULT NULL COMMENT 'The ID of the target entity.',
  `title` varchar(255) DEFAULT NULL,
  `link` varchar(2048) DEFAULT NULL,
  `author` varchar(255) DEFAULT NULL,
  `description` longtext,
  `timestamp` int(11) NOT NULL,
  `guid` longtext
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='The base table for aggregator_item entities.';