Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment module doesn't properly remove its tables when uninstalled. #1264

Closed
jenlampton opened this issue Sep 27, 2015 · 5 comments
Closed

Comments

@jenlampton
Copy link
Member

Steps to reproduce:

  1. enable comment module (if not enabled already)
  2. disable comment module
  3. go to uninstall page
    No modules are available to uninstall.
  4. go back to the module list
  5. enable comment module
    DatabaseSchemaObjectExistsException: Table comment already exists. in DatabaseSchema->createTable() (line 646 of backdrop/core/includes/database/schema.inc).
@jenlampton
Copy link
Member Author

Quick fix, drop the comment tables yourself:

drop table comment;
drop table node_comment_statistics;
update system set status = 0 where name = "comment";

Note, if you had fields on your comment you'll need to delete the config from the active directory and import them again using Config mgmt.

@quicksketch
Copy link
Member

I can't reproduce this problem. Before uninstalling comment:

screenshot55

After disabling and then uninstalling comment:
screenshot56

I even tried turning the module on again, adding a comment, then uninstalling it again. It still was deleted immediately.

The only thing I can think of here that might cause this would be if you had more than 200 comments on the site. In which case the field deletion problem may have struck again (see #82). Since Backdrop will not delete 200 fields worth of data at one time, it may have required that cron run the "arbitrary number of times" until all comments have been deleted (including their data in field tables).

@jenlampton
Copy link
Member Author

In my use-case there were zero comments (I disabled it immediately after using the default profile). But when visiting the uninstall page there was nothing in the list. Were you actually able to uninstall something?

I checked my git history to see which version of Backdrop I was running when I disabled comment, but in my bootstrap.inc it says define('BACKDROP_VERSION', '1.1.x-dev');. Not super helpful, sorry.

@quicksketch
Copy link
Member

But when visiting the uninstall page there was nothing in the list. Were you actually able to uninstall something?

Yes, after disabling comment module it was available to uninstall on /admin/modules/uninstall. That's really odd that it wasn't available for uninstallation, especially if the comment table was there, then comment module had to have been installed at some point.

Well, as-is we don't have a way of reproducing this issue now. Should we close it until we have more information (if that ever happens)?

@jenlampton
Copy link
Member Author

sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants