When I tried to delete any comment of a status, the web page shows error after hitting "Confirm":

Error

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

In the "Recent log messages", the below SQL error is caught:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'DATABASE_NAME.PREFIX_flag_content' doesn't exist: DELETE FROM {flag_content} WHERE (content_type = :db_condition_placeholder_0) AND (content_id = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => fbss_comment [:db_condition_placeholder_1] => 2 ) in fbss_comments_flag_fbss_comments_delete() (line 36 of /path/to/modules/statuses/submodules/fbss_comments/fbss_comments_flag/fbss_comments_flag.module).
CommentFileSizeAuthor
#10 fbss_comments_flag.module.patch2.04 KBkietnguyen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

metakel’s picture

This "severe error" also happens on the non-dev version: 7.x-1.0-beta1.

I can edit the comments, but cannot delete them.

metakel’s picture

Status: Fixed » Active

Oh, it works after I disable the Statuses Comment submodule, uninstall it and then re-enable it.

I had tried to "drush updatedb" before but there were no table to update and the error still happens. It seems that the module does not created the database table in the first installation process (I enabled the whole bunch of submodules together with the main "Statuses" module) and the table is created in the second attempt of installation.

metakel’s picture

Status: Active » Fixed
metakel’s picture

I am very sorry that after a few days, and after I have done some operations on modules (the site is still under development), the problem arises again, I do not know why, even I do the above disable-uninstall-enable thing again. And even if I disable-uninstall-enable all submodules of the Statuses module, I am still unable to fix it.

Versions:
Flag: 7.x-3.0-alpha3+4-dev
Statuses: 7.x-1.0-beta1+22-dev

I have checked the database, there is really no table named 'DATABASE_NAME.PREFIX_flag_content' (DATABASE_NAME and PREFIX are my own Drupal's settings). I do not know why the table is not created and how should I do to create the table.

metakel’s picture

Can only make it work again when I downgrade the Flag module to version 2.0.

IceCreamYou’s picture

Status: Active » Closed (duplicate)
metakel’s picture

Status: Closed (duplicate) » Active

The problem arises again. This time with another error message logged.

Using Flag 7.x-2.0.

SEVERITY: error

Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given, called in /path/to/all/modules/statuses/submodules/fbss_notifications/fbss_notifications.module on line 83 and defined in db_query() (line 2313 of /path/to/drupal/includes/database/database.inc).
IceCreamYou’s picture

Status: Active » Closed (duplicate)
metakel’s picture

Thank you very much for the hint "IceCreamYou".

After I have deleted the "submodules/fbss_notifications" directory, the delete comment function works again.

kietnguyen’s picture

I had the similar error message and I think the problem is similar to this one https://drupal.org/node/1857706. So I created a patch similar to melsawy's solution and it worked for me.

JohnnyW’s picture

Issue summary: View changes

WOW -- 3 years ago and still having this problem... WOW... I understand the Osborne Effect, but really? Anyways, #10 fixed my issue -- THANKS!!!!