Spam filters list missing tables
| Project: | Spam |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
I downloaded for the first time today, and installed on a Drupal 6.9 site. I only enabled the "Spam API", "Bayesian filter" and "Spam URL filter" modules.
When I go to the Spam module admin pages, there are two tabs: General and Filter. The Filter tab has these errors on the page:
" * user warning: Table 'mcq14816_drpl1.craig_spam_filters' doesn't exist query: SELECT fid FROM craig_spam_filters WHERE name = 'Bayesian filter' AND module = 'bayesian' LIMIT 0, 1 in /home/mcq14816/public_html/drupal/sites/all/modules/spam/spam.module on line 949.
* user warning: Table 'mcq14816_drpl1.craig_spam_filters' doesn't exist query: DELETE FROM craig_spam_filters WHERE name = 'Bayesian filter' AND module = 'bayesian' in /home/mcq14816/public_html/drupal/sites/all/modules/spam/spam.module on line 968.
* user warning: Table 'mcq14816_drpl1.craig_spam_filters' doesn't exist query: INSERT INTO craig_spam_filters (name, module, status, weight, gain) VALUES('Bayesian filter', 'bayesian', 1, 0, 100) in /home/mcq14816/public_html/drupal/sites/all/modules/spam/spam.module on line 980.
* user warning: Table 'mcq14816_drpl1.craig_spam_filters' doesn't exist query: SELECT fid FROM craig_spam_filters WHERE name = 'URL filter' AND module = 'url' LIMIT 0, 1 in /home/mcq14816/public_html/drupal/sites/all/modules/spam/spam.module on line 949.
* user warning: Table 'mcq14816_drpl1.craig_spam_filters' doesn't exist query: DELETE FROM craig_spam_filters WHERE name = 'URL filter' AND module = 'url' in /home/mcq14816/public_html/drupal/sites/all/modules/spam/spam.module on line 968.
* user warning: Table 'mcq14816_drpl1.craig_spam_filters' doesn't exist query: INSERT INTO craig_spam_filters (name, module, status, weight, gain) VALUES('URL filter', 'url', 1, -6, 250) in /home/mcq14816/public_html/drupal/sites/all/modules/spam/spam.module on line 980.
* user warning: Table 'mcq14816_drpl1.craig_spam_filters' doesn't exist query: SELECT COUNT(*) FROM craig_spam_filters WHERE gid = 0 in /home/mcq14816/public_html/drupal/sites/all/modules/spam/spam.module on line 694.
* user warning: Table 'mcq14816_drpl1.craig_spam_filters' doesn't exist query: SELECT fid, gid, name, status, weight, gain FROM craig_spam_filters WHERE gid = 0 ORDER BY weight ASC LIMIT 0, 50 in /home/mcq14816/public_html/drupal/sites/all/modules/spam/spam.module on line 694.
There are currently no spam filters available."

#1
I enabled all the modules, and it only made the list of missing tables longer. I ran the update.php on the site too, and that didn't make a difference.
#2
Can't duplicate. Please reopen if the problem persists.
#3
Finding the same thing here with the 5.x version, no tables (for any filter) are created. Looking to manually add them if at all possible.
#4
I have the same problem. This is with a fresh install of 6.x-1.0.
#5
FYI, this fixed the problem for me:
1. Disable all spam modules
2. Connect to the database
3. Get list of current spam module tables: show tables like 'spam%';
4. Delete tables (repeat for each): drop tables spam_duplicate; ...
5. Delete spam module registration with Drupal: delete from system where name='spam' and type='module';
6. Reenable spam modules
#6
The steps you state you took to fix the problem are what would be required to have a "fresh" install of 6.x-1.0 -- there would be no existing spam tables in the database. Otherwise, the install was an upgrade, not a clean install.
Specifically, this problem could apparently occur if one did not note the warning at the beginning of the INSTALL document, stating that before upgrading to Drupal 6.x, any version of Spam on a 5.x install must be upgraded to a 5.x-3.x build or the install will fail.
If you deleted all your spam tables and reenabled the spam modules (thereby recreating the tables,) and it then worked, that clearly means there was old data in there that was causing a problem.
Frankly, I'm not sure there's a very good way to test this save for a 5.x site that is backed up and then upgraded to 6.x, and then the 5.x site put up elsewhere so it can be compared. But one can hope.
And in general, more detail would be necessary to troubleshoot any of these.
(For the problem above with 5.x: if you don't have any tables created at all, you have a very different problem. Seeing as that's part of the install process, which is fairly well-tested for that big a failure, I'd say the most likely scenario is that your login settings to your database have changed. I can't imagine what else would cause no tables at all to be created, other than some catastrophic deletion of parts of your Drupal core installation.)
#7
Yes, you're correct about the fresh install part. This was during an upgrade from a drupal 5 site with the 5.x-1.1.2 version installed. However:
1. According to INSTALL.txt, 5.x-1.x installs must first be upgraded to 5.x-3.0-beta1, which I couldn't do because I was already running Drupal 6
2. Since I (apparently) had no upgrade path, the documented alternative was to uninstall, reinstall, and drop all spam_* tables.
With that being done, in my mind it was a fresh install as all of the configuration and heuristics accumulated over the past couple of years was wiped out and I didn't think anything was leftover in other tables. Sorry, I certainly could've been more clear.