Issues with eMail processing on modular forms




I make multiple use of the form-plugin within a modular page.
The page consits of a modular sub-pages of special offers and every offer has a form attached which is somehow different to the other offer-forms on this page. (Basically some values is a selectbox are different)

Besides this offer-forms there is a contact-form in the footer of this page too, which uses the same eMail-plugin config and within this footer-form everything works fine.
But within the modular-page-form eMail-processing doesn´t work and also all the following processing steps (and logging) are not executed. But when the email-processing part ist commented out all the other steps (save, redirect, reset) work fine: Form gets saved and the browser redirects.

I include the form with
{% include "forms/form.html.twig" with { form: page.header.form } %}
in the modular-template, which makes use of the form-twigs that are provided by the form-plugin itself. All the needed hidden fields are there:

  • form-name
  • unique_form_id
  • form-nonce

Both, the footer-form and my modular-sub-page-forms have the exact same processing configuration.

The modular-sub-page-form has

cache_enable: false


form.action: /route-to-modular-page

set in addition and other fields.

eMail-plugin-conf is set with SMTP/SSL and this config works fine for the footer-form.

additionally i tried with

debug: true
  display: 1                                    
  log: true

but nothing gets written to the logs too.
Also logging is fine for the footer-form.

Any Ideas and advice how to furhter track down this issue?



can you post your form definition?

also, make sure everything is correct with your email setting by typing this command:
bin/plugin email test-email -t


sure (with some german ;-)):

title: Winterzauber
template: modular/arrangement
unpublish_date: 04-03-2018
cache_enable: false

  name: Winterzauber
  classes: "row 50%"
  action: '/angebote'
    - name: Anrede
      label: Anrede
      placeholder: Anrede
      type: select
        Frau: Frau
        Herr: Herr
      outerclasses: "3u 12u(mobilep)"
        required: true

    - name: Name
      label: Name
      placeholder: Vor-/Nachname
      type: text
      outerclasses: "9u 12u(mobilep)"
        required: true

    - name: eMail
      label: eMail
      placeholder: eMail
      type: email
      outerclasses: "12u"
        rule: email
        required: true
    - name: Option
      label: Option
      type: select
        DPL-See-138: '€ 138,- pro Person im Doppelzimmer zum See gelegen'
        EZL-158: '€ 158,- im Einzelzimmer'
      outerclasses: "12u"
        required: true

    - name: Ankunft
      label: 'Anreise'
      placeholder: 'Anreise (TT.MM.JJJJ)'
      type: text
      #  type: date not support by all browser: TODO: find clever fallback
      outerclasses: "6u 12u(mobilep)"
        required: true

      - type: submit
        value: "Anfrage abschicken"
      - type: reset
        value: "zurück setzen"
        classes: "alt"

    - email:
        from: "{{ form.value.eMail|e }}"
        to: "{{|e }}" #this additional value is set in email.yaml
        subject: "[Buchungsanfrage:] {{ form.value.Name|e }}"
        body: "{% include 'forms/data.html.twig' %}"
    - save:
        fileprefix: Winterzauber-
        dateformat: Ymd-His-u
        extension: html
        body: "{% include 'forms/data.html.twig' %}"
    - redirect: '/danke'
    - reset: true

I tried also with static process[email.values] with no success.


bin/plugin email test-email -t

Message sent successfully!

works fine!

the test-email also sends the SMTP/SSL credentials, which is somehow… puh :wink:


I figured it out.
I had an 301 redirect in site.yaml set to that action-route.
And that turned the POST into an GET.