Epic #69036: EXT:form - Optimize layout rendering
New Form ext throws error on missing wraps
When removing the wrapper elements in the following 2 segments in the layout section, a FE error is thrown:
<element /> // removed the li-wrapper (or dt..)
<elements /> // removed the ul-wrapper (or dl...)
#1: PHP Catchable Fatal Error: Argument 3 passed to tx_form_View_Form_Element_Abstract::replaceNodeWithFragment() must be an instance of DOMNode, null given, called in /[path]/typo3/sysext/form/Classes/View/Form/Element/Abstract.php on line 127 and defined in /[path]/typo3/sysext/form/Classes/View/Form/Element/Abstract.php line 286 (More information)
t3lib_error_Exception thrown in file
/[path]/t3lib/error/class.t3lib_error_errorhandler.php in line 105.
Updated by Franz Koch over 9 years ago
- Target version set to 4.7.0-RC2
The issue is far greater. Your layout settings for rendering the form on your website are also used to render the HTML output - and this a) throws this error and b) once fixed borks completely your HTML mails. The "fix" for me was to XCLASS the mail postProcessor and feed the LayoutHandler (gladly a singleton here) with a fake "layout." array that overrides any custom layout changes.
Edit - I've set the target version because I think this needs to be fixed for 4.7. At least add my mentioned temporary fix/workaround until a nicer solution was found.
Updated by Benjamin bunse over 9 years ago
Christjan Grabowski wrote:
Do you have piece of code or an extension for the xclass?
Did you xclass "tx_form_system_postprocessor_mail"?
I'd also like to see the workaround solution here. Could you show the xclass (extension?), the layout you defined in TypoScript and the "fake" layout you feed the LayoutHandler? I think that could help a lot here!
Updated by Bjoern Jacob about 6 years ago
- Status changed from New to Closed
I've tested the described problems:
- elementWrap: still cannot be "empty". Since we're moving to a new rendering solution based on fluid we are not fixing this issue.
- containerWrap: just tested it. It can be "empty". No problem here.
Having different renderings for the form, confirmation and email is possible when merging #69176.
I'm closing this issue. We're having it on our roadmap :)