DatabaseSchemaObjectExistsException: Table feeds_importer already exists. in DatabaseSchema->createTable() (line 630 of /home/../public_html/../includes/database/schema.inc).

I get this error when enabling the module. Any ideas?

Comments

apmsooner’s picture

specifically this is when i enable the admin ui. It is critical issue because it won't allow me to import anything after even bypassing the error and creating a feed importer.

apmsooner’s picture

also... with feeds enabled... i get this error when trying to run cron:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'autop5_webdemo.feeds_log' doesn't exist: DELETE FROM {feeds_log} WHERE (request_time < :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 1293646858 ) in feeds_cron() (line 43 of /home/../public_html/../sites/all/modules/feeds/feeds.module).

David Goode’s picture

Status: Active » Postponed (maintainer needs more info)

I didn't come across this issue when enabling either feeds or feeds_ui. Any other specifics? Make sure to use the latest checkout from CVS of the 7.x branch. The alpha is not meant to be stable.

apmsooner’s picture

hmm... maybe thats the problem is the module version. Unfortunately i have no idea how to get the latest checkout from CVS... the only link on the module page is for the alpha version. I didn't see anything stating that version was unstable.... other than that it is "alpha".

David Goode’s picture

Try either using CVS: http://drupal.org/node/583948/cvs-instructions/DRUPAL-7--2
or just downloading the -dev release on the releases page: http://drupal.org/node/927032

apmsooner’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Thanks. I'm beginning to think this is a greater issue related to drupal core. I'm getting this error now in drupal 7.0 latest stable release:
Fatal error: Class 'PDO' not found in /home/../public_html/../includes/database/database.inc on line 185

So i'm just going to close this issue out and assume its not feeds related for now and reinstall drupal all together.

apmsooner’s picture

Okay still not working... i installed the dev version and still having the errors popup. I'm going to have to just wait it out for a stable release i guess.
Thanks.

webthingee’s picture

I am also getting this error...
running...
Drupal core 7.0
Chaos tool suite 7.x-1.0-alpha2
Job Scheduler 7.x-2.0-alpha2

and when I enable Feeds 7.x-2.x-dev

I get...
DatabaseSchemaObjectExistsException: Table feeds_importer already exists. in DatabaseSchema->createTable() (line 630 of /home/clients/websites/w_hear/public_html/hear/includes/database/schema.inc).

The error clears with a screen refresh.

When I run cron, the error comes again.

* Note: I tried to uninstall feeds to start over, and noticed it was not listed in 'uninstall'

Ooxo’s picture

Got the same problem, I created the missing table, and now everything seems fine!
Hope it helps

CREATE TABLE IF NOT EXISTS `feeds_log` (
  `flid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `id` varchar(128) NOT NULL,
  `feed_nid` int(10) unsigned NOT NULL,
  `log_time` int(10) NOT NULL DEFAULT '0',
  `request_time` int(10) NOT NULL DEFAULT '0',
  `type` varchar(64) NOT NULL,
  `message` text NOT NULL,
  `variables` blob NOT NULL,
  `severity` int(10) unsigned NOT NULL DEFAULT '0',
  UNIQUE KEY `flid` (`flid`),
  UNIQUE KEY `id` (`id`),
  UNIQUE KEY `id_feed_nid` (`id`,`feed_nid`),
  UNIQUE KEY `request_time` (`request_time`),
  UNIQUE KEY `log_time` (`log_time`),
  UNIQUE KEY `type` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
bryancasler’s picture

subscribe

molave’s picture

Subscribing. I have the same issue. Thanks.

wiherek’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev

same issue - latest dev version, drupal 7.14

chrisjlee’s picture

I just dropped that table and then feeds was able to work for me.

How to reproduce this issue for me:

install drupal 7.20
install feeds_ui, feeds
drush dis feeds feeds ui; drush pm-uninstall feeds_ui feeds;
renable feeds

Disabling feeds then leaves two leftover tables: feeds_source feeds_importer

Each time i have to drop them in order to renable feeds, feeds ui:

drop table feeds_importer; drop table feeds_source; drop table feeds_item;

Have this problem with feeds 2.x dev and feeds 2.x-alpha7

ann b’s picture

Issue summary: View changes
Priority: Critical » Minor
Status: Closed (cannot reproduce) » Active

It would be helpful if the uninstall dropped all of the feeds tables, including cache_feeds_http. I had to manually drop all of the feeds tables, in order to get an uninstall/reinstall to work on a test site. Thanks @chrisjlee for the tip in #13.

Feeds 7.x-2.0-beta3

megachriz’s picture

Status: Active » Postponed (maintainer needs more info)

@ann b
I just tried to uninstall Feeds and all feeds tables were correctly gone, including 'cache_feeds_http'. Drupal automatically removes database tables when uninstalling a module, if the module in question has properly declared its tables (in an implementation of hook_schema(), see feeds_schema() in feeds.install), which I think Feeds does. It's possible that due to an error that happened during the uninstallation, Drupal was unable to fully complete the uninstallation. This may be caused by a bug in a module or PHP exceeding the maximum execution time (for example when uninstalling many modules at once). Do you notice any error messages in the log at the time of the uninstallation? Check both the database log (admin/reports/dblog) and the server error log.

megachriz’s picture

@chrisjlee
Disabling a module does not remove its tables. Only uninstalling a module does.
The command drush pm-uninstall feeds_ui feeds will only uninstall feeds_ui. For some reason, drush cannot set the right order of modules to uninstall and instead comes up with the following response:

To uninstall feeds, the following modules must be uninstalled first: [error]
feeds_ui
The following modules will be uninstalled: feeds_ui
Do you really want to continue? (y/n): y
feeds_ui was successfully uninstalled.

Which leaves Feeds still installed. It should not however cause the error of already existing tables when enabling Feeds again, as Feeds is officially still installed at this point.

ann b’s picture

Thanks @MegaChriz. I was using the front-end to disable and uninstall the modules, and was having trouble getting the feeds module to show up in the uninstall list. I thought I had uninstalled it at some point but I checked the logs. I only disabled it. So when I re-enabled the module, I would get the following error or a similar one with a different table name:

DatabaseSchemaObjectExistsException: Table feeds_importer already exists. in DatabaseSchema->createTable() (line 660 of .../includes/database/schema.inc).

ann b’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)