Trying to add an email handler to a form using a select menu of email addresses that I created as an Option. After configuring the email handler to use this Option, I click Save, and the animated spinner appears for a second or two, then goes away and nothing else happens. The handler does not save, and the only option is to click the "X" in the upper-right to close the config window. I've gone through a lot of troubleshooting, trying every permutation of options I could think of, but I'm still getting the same results.

Further information:

1.) This issue is happening on two separate, unrelated Drupal sites, one on a localhost on my personal laptop at home, the other on a configured server at work. Both are WAMP environments with Composer, Drush, and Git configured.

2.) I had previously installed the patch to allow "Disable saving of submissions" on the server at work, but backed out of that and retested with the same results: unable to save email handler with a select menu of email recipients.

3.) After clicking the Save button, the configuration window is suddenly surrounded by a blue border, and two rectangular areas appear at the bottom. Knowing that this is too weird to just describe, here is a screenshot that shows what I'm talking about:

Screenshot showing blue border and mystery rectangles

Comments

kduryee created an issue. See original summary.

kduryee’s picture

Even more additional information: I just discovered an error message in the logs that I somehow didn't see in all my troubleshooting - apparently there is some code in core that doesn't like dots in email addresses. The listed email address is the first one in the select menu, I starred out the username below:

Type: php
Date: Tuesday, May 2, 2017 - 15:32
User: admin
Location: http://xxxxx/admin/structure/webform/manage/appeal_form/handlers/add/ema...
Referrer http://xxxxx/admin/structure/webform/manage/appeal_form/handlers
Message Drupal\Core\Config\ConfigValueException: *****@xxxx.xxx key contains a dot which is not supported. in Drupal\Core\Config\ConfigBase->validateKeys() (line 211 of D:\server\www\core\lib\Drupal\Core\Config\ConfigBase.php).
Severity: Error

jrockowitz’s picture

Version: 8.x-5.0-beta12 » 8.x-5.x-dev

Yep, I know what the issue is. It is not exactly easy to fix but it is fixable.

Basically the below YAML config...

to_options:
  value.with.period.01: 'one@example.com'
  value.with.period.02: 'one@example.com'

Needs to be converted to...

to_options:
  - value: 'value.with.period.01'
     text: 'one@example.com'
  - value: 'value.with.period.02'
     text: 'one@example.com'
kduryee’s picture

Version: 8.x-5.x-dev » 8.x-5.0-beta12

  • jrockowitz committed 2b79aae on 2875371-options-with-dot
    Issue #2875371 by kduryee: Can't Add Email Handler w/Select "Send To"
    
jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new8.94 KB

Status: Needs review » Needs work

The last submitted patch, 7: can_t_add_email_handler-2875371-6.patch, failed testing.

  • jrockowitz committed 41ead7a on 2875371-options-with-dot
    Issue #2875371 by kduryee: Can't Add Email Handler w/Select "Send To"
    
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new9.42 KB

Status: Needs review » Needs work

The last submitted patch, 10: can_t_add_email_handler-2875371-9.patch, failed testing.

  • jrockowitz committed 121c8c5 on 2875371-options-with-dot
    Issue #2875371 by kduryee: Can't Add Email Handler w/Select "Send To"
    
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new11.68 KB

  • jrockowitz committed cf88170 on 2875371-options-with-dot
    Issue #2875371 by kduryee: Can't Add Email Handler w/Select "Send To"....
jrockowitz’s picture

StatusFileSize
new13.92 KB

Same patch with unit tests.

  • jrockowitz committed 23255ac on 8.x-5.x
    Issue #2875371 by jrockowitz, kduryee: Can't Add Email Handler w/Select...
jrockowitz’s picture

Status: Needs review » Fixed

I committed the patch. Please download and review the latest dev.

kduryee’s picture

Beautiful! Works like a charm. Thank you!

Status: Fixed » Closed (fixed)

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