Can not uninstall aggregator

Created on 28 June 2023, about 1 year ago
Updated 3 October 2023, 9 months ago

Problem/Motivation

When trying to uninstall aggregator using

drush pm:uninstall aggregator

if fails on this

[error]  Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Invalid object name 'aggregator_feed'.: SELECT [fid] FROM [aggregator_feed] WHERE [queued] = 0 AND [checked] + [refresh] < :time AND [refresh] <> :never; Array
(
    [:time] => 1687919283
    [:never] => 0
)
 in Drupal\aggregator\FeedStorage->getFeedIdsToRefresh() (line 21 of modules/contrib/aggregator/src/FeedStorage.php)

Steps to reproduce

I dont know how but i think something failed during installation

Proposed resolution

Create missing tables

BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
CREATE TABLE YOURDATABASE.dbo.aggregator_feed
	(
	fid int NULL
	)  ON [PRIMARY]
GO
ALTER TABLE YOURDATABASE.dbo.aggregator_feed SET (LOCK_ESCALATION = TABLE)
GO
COMMIT

BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
CREATE TABLE YOURDATABASE.dbo.aggregator_item
	(
	iid int NULL
	)  ON [PRIMARY]
GO
ALTER TABLE YOURDATABASE.dbo.aggregator_item SET (LOCK_ESCALATION = TABLE)
GO
COMMIT

Then run

drush pm:uninstall aggregator

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Closed: cannot reproduce

Version

1.0

Component

Code

Created by

πŸ‡ΈπŸ‡ͺSweden arne_hortell

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @arne_hortell
  • πŸ‡ΊπŸ‡ΈUnited States dcam

    Yeah, it kind of sounds like there was a problem with the installation of the entity table. Just so we're clear: are you confirming that there was no aggregator_feed table in the database prior to the uninstallation?

  • πŸ‡ΈπŸ‡ͺSweden arne_hortell

    Yes @dcam, there was no such database.

  • First commit to issue fork.
  • Status changed to Closed: cannot reproduce 9 months ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Marking this as cannot reproduce as it feels like an environment specific issue.

    If there are reliable steps to reproduce starting from 'install drupal, install aggregator' then please feel free to reopen and provide further info.

    Thanks for taking the time to open the issue.

Production build 0.69.0 2024