All of my filters are displayed twice on the admin/settings/spam/filters page. I believe this happened after updating to dev version. I did make sure to delete all previous files before updating.

Comments

dzepol’s picture

I also see this and I also made sure to delete all the previous files before updating.

killes@www.drop.org’s picture

Status: Active » Closed (cannot reproduce)

I don't see this.

LUTi’s picture

Version: 6.x-1.x-dev » 6.x-1.2

I see this in recently published 1.2 version as well. It is interesting that 2 filters appear "only" once, altough they are not enabled. So, each filter explicitely enabled (among modules) is listed twice, the others once. Maybe this information can be helpful...

LUTi’s picture

BTW, how can an issue be simply closed (as you can not reproduce it) - even if there seems to be more of us that are facing teh same issue? So, there is a problem somewhere (and, popped out after update 1.0 -> 1.2).

LUTi’s picture

After update (1.0 -> 1.2) there are duplicate entries in spam_filters table. (Probably) the old ones with module column values "bayesian", "custom" etc., and the new ones where those values are "spam_filter_bayesian", "smap_filter_custom" etc.

Uninstalling spam module completely and reinstall resolves this issue

It seems to help also to manually edit the table entries before an update. In any case, I believe the install procedure is buggy (it should take care about that).

What I found strange is also that before update I've had checked all filters (except the "node age" one). After the update, they were all unchecked. I've checked all of them but "node age" and "custom" (which was checked before teh update). Despite of that (and also before I've checked any of them), there were all 5 filters (enabled before the update) listed on the settings page (/admin/settings/spam/filters). Even after I've checked 4 of them, but not "custom" filter, they were all (inclucing "custom"!) still listed on the settings page (and, all of them checked).

I'd say it is somehow inconsistent to have those filters listed as modules (to be enabled/disabled there) and on the settings page. What is the purpose of that? Wouldn't if be enough to enable/disable them at one place only?

killes@www.drop.org’s picture

Status: Closed (cannot reproduce) » Active

It is not forbidden to reset a status if you think I was wrong...

Now that I have more information: apparently somebody changed the way the filters get stored in the table but didn't provide an update function to change them.

I guess somebody could provide an upgrade function that does the renaming in the database.

AlexisWilke’s picture

Killes,

Do you mean this function?

  spam_install_filter()

Because I don't see any difference between the 1.0 and 1.2 versions of that function... Which one, otherwise?

Thank you.
Alexis

--------------------- UPDATE

Nevermind, I see it. I arrived after that change... 8-)

filter_info in 1.0

    case 'filter_info':
      return array(
        'name' => t('Bayesian filter'),
        'module' => t('bayesian'),
        'description' => t('A bayesian spam filter.'),
        'help' => t('The bayesian filter can learn to tell the difference between valid content spam content.'),
      );
      break;

filter_info in 1.1+

    case 'filter_info':
      return array(
        'name' => t('Bayesian filter'),
        'module' => t('spam_filter_bayesian'),
        'description' => t('A bayesian spam filter.'),
        'help' => t('The bayesian filter can learn to tell the difference between valid content spam content.'),
      );
      break;

So an update should rename the module before the spam_install_filter() function gets called.

Thank you.
Alexis

AlexisWilke’s picture

Would you foresee ONE update in the spam/spam.install file? Or one update per filter?
Thank you.
Alexis

AlexisWilke’s picture

Actually, reading this one #1185292: Upgrade info--need to manually uninstall we may just want to do it very simple:

db_query("DELETE FROM {spam_filters}");

This should not cause any side effect, right?

Thank you.
Alexis