Namespacing for Sub-modules

chawl - August 9, 2009 - 16:07
Project:Spam
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:gnassar
Status:active
Description

Hello,

Spam module's Custom Filter gets mixed up with "Custom Filter" module on module configuration page due to naming conflict. Therefore native Custom Filter module's entry disappears when two of the modules are present.

How about renaming yours to "Spam Custom Filters"?

Tx.

#1

Jeremy - August 9, 2009 - 16:21

Yes, somewhere there is an issue to properly name space the spam filter modules -- this will be happening after the 6.x-1.0 stable release (which should be next week). This issue should be marked as a duplicate of that issue -- and a link to that issue should be placed here.

#2

naught101 - August 10, 2009 - 01:50
Title:Custom Filter gets mixed up with "Custom Filter" module» Namespacing for Sub-modules (Custom Filter gets mixed up with "Custom Filter" module)

#361547: How to set the maximum number of URLs? has discussion about this problem, but it's not actually devoted to this issue. Perhaps this one should me made more general?

#3

gnassar - August 10, 2009 - 16:07
Title:Namespacing for Sub-modules (Custom Filter gets mixed up with "Custom Filter" module)» Namespacing for Sub-modules
Component:Custom Filters» Code
Assigned to:Anonymous» gnassar

Yes. None of the issues that mention this actually have this as their primary purpose.

Right now, it's looking like this will wait until after the final 1.0 release.

#4

kiamlaluno - August 10, 2009 - 19:17

I don't see any menu definition that could interfere with Custom filter. May anybody point me at which menu causes the conflict?

#5

kiamlaluno - November 18, 2009 - 10:41

In the development snapshot, the sub-modules are still incorrectly named; the short name of those modules should start with spam_.
This is also true for version 6.x-1.0.

The long name of a module is the same of another module (Custom filter); to avoid confusions, it should be renamed.

#6

naught101 - December 2, 2009 - 10:33

Ok, I've namespaced all the modules, and it appears to be working fine. I've tried to break it and haven't managed so far. A few questions:

There are a few functions that were inconsitently named, like custom_spam_filter() and custom_spam_custom_operations() (!). Should these be renamed spam_custom_filter() or spam_custom_spam_filter()? Should custom_spam_custom_operations() be reduced to spam_custom_operations()?

There are some database variables like bayesian_tokenizer and custom_probably. I'm not entirely sure how to upgrade these. Help would be appreciated.

Filters will have to be re-enabled, unless there's a way to upgrade the filter status (this might be best avoided, we're doing this for name clashes, and it'd be a bit bad to break a different name-clashed module).

 
 

Drupal is a registered trademark of Dries Buytaert.