Hi there,

After adding in a setting for a module (and optional key) on the settings page, the module is no longer present in the 'New Setting' module select box. This means that it is not possible to have:

- different settings for different keys in the same module
- a setting for the module and then a different setting for a specific key

The description at the top about search order seems to imply that the module looks for these in a theme-like way, looking for a module-key class, then a module class and then the site-wide default. I'm just wondering how this is possible in the current situation, as it doesn't seem that you can add in a module class and then go on to add a module-key class (or vice versa).

Is there a way to do this through the admin interface?

Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pillarsdotnet’s picture

Assigned: Unassigned » pillarsdotnet
Status: Active » Needs work

Thanks for the report; I'm checking up on this.

damien_vancouver’s picture

Version: 6.x-2.26 » 7.x-2.x-dev
Status: Needs work » Needs review
FileSize
470 bytes

I had this problem too, but it was easily solved by removing line 80 of mailsystem.admin.inc (for 7.x-2.33):

 unset($descriptions[$module]);

Then the module appears in the list of available modules to create a new key for. I've now created three different keys for my module and Mail System correctly creates and registers the MailSystemInterface class for all three. I set one to HTML and one to Default and verified that I got the correct output.

Attached patch for 7.x-2.x-dev... I assume the fix would be the same for 8.x and 6.x... I could reroll for these if you want.

pillarsdotnet’s picture

Title: Can't create multiple settings for a module » Allow multiple setting keys per mail module.
Status: Needs review » Reviewed & tested by the community

Applied patch. Will be available in next release.

pillarsdotnet’s picture

Version: 7.x-2.x-dev » 7.x-2.34
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.