Bug #58598

tx_form breaks on custom label

Added by Matthias Kuchem over 8 years ago. Updated over 7 years ago.

Must have
Form Framework
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


I feel like this is a huge issue and there are several bugs opened years ago, covering parts of it, but there still is no fix in sight.
When tx_form is used and it's frontend output is changed, according to the documentation, with the layout configuration (either tt_content.mailform.20.layout or in the FORM object itself), the resulting E-Mail is unreadable, because the MailPostProcessor tries to add these styles in the mail. Even worse, if you do change the label, the sending process breaks with

#1: PHP Catchable Fatal Error: Argument 3 passed to TYPO3\CMS\Form\View\Mail\Html\Element\AbstractElementView::replaceNodeWithFragment() must be an instance of DOMNode, null given, called in /var/www/typo3_src-6.2.2/typo3/sysext/form/Classes/View/Mail/Html/Element/AbstractElementView.php on line 111 and defined in /var/www/typo3_src-6.2.2/typo3/sysext/form/Classes/View/Mail/Html/Element/AbstractElementView.php line 228

A minimal example can be created by setting the label layout to literally anything, even the default value, according to doc, breaks when set manual.

tt_content.mailform.20.layout.label = <label><labelvalue /><mandatory /><error /></label>

When you do submit any form with this conf, the above error is thrown.

Related issues

Related to TYPO3 Core - Bug #39138: sysEXT:form checkbox send as input field in EMailClosedPatrick Broens2012-07-20

Related to TYPO3 Core - Bug #37349: Layout change modifies email outputClosed2012-05-21

Related to TYPO3 Core - Bug #32463: New Form ext throws error on missing wrapsClosed2011-12-12

Related to TYPO3 Core - Bug #31951: Own checkbox layout breaks HTML mailClosed2011-11-20


Updated by Bjoern Jacob about 8 years ago

Yeah, have the same problem. We'll look into it and try to supply a patch.


Updated by Frans Saris over 7 years ago

  • Status changed from New to Needs Feedback

I think this one can be closed now #31951 is reloved.


Updated by Matthias Kuchem over 7 years ago

Yes, thanks for the feedback.

For anyone running into this problem (since the old configuration still exists in documentation and probably tutorials): Move your configuration from tt_content.mailform.20.layout to tt_content.mailform.20.form.layout. For details see #31951 and the linked changeset.


Updated by Alexander Opitz over 7 years ago

  • Status changed from Needs Feedback to Closed
  • Target version deleted (next-patchlevel)

Thanks for feedback.

Also available in: Atom PDF