Project

General

Profile

Actions

Bug #69817

closed

EXT:form - fatal at mail sending if label layout contains a label tag

Added by Björn Jacob over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
Start date:
2015-09-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:

Description

The default value for the label wrapping looks like this <label><labelvalue /><mandatory /><error /></label>. When overriding it on a global level with the following code the mail cannot be sent.


label = <label><labelvalue /><error /><mandatory /></label>

After submitting the form the following PHP error occurs:

#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
/vendor/typo3/cms/typo3/sysext/form/Classes/View/Mail/Html/Element/AbstractElementView.php
on line 104

and defined in
/vendor/typo3/cms/typo3/sysext/form/Classes/View/Mail/Html/Element/AbstractElementView.php
line 220 (More information)

TYPO3\CMS\Core\Error\Exception thrown in file
/vendor/typo3/cms/typo3/sysext/core/Classes/Error/ErrorHandler.php
in line 107.
Actions #1

Updated by Björn Jacob over 8 years ago

  • Subject changed from Forms: mail processor dies when a global layout override exists to EXT:form - mail processor dies when a global layout override exists
  • Assignee deleted (Ralf Zimmermann)
  • TYPO3 Version changed from 7 to 6.2
  • Complexity set to hard

This is fixed for 7.5. We should also fix this for 6.2 but it's quite some work.

Actions #2

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43481

Actions #3

Updated by Ralf Zimmermann over 8 years ago

  • Subject changed from EXT:form - mail processor dies when a global layout override exists to EXT:form - fatal at mail sending if label layout contains a label tag
  • Status changed from Under Review to New
Actions #4

Updated by Ralf Zimmermann over 8 years ago

  • Status changed from New to Under Review
Actions #5

Updated by Gerrit Code Review over 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43481

Actions #6

Updated by Gerrit Code Review over 8 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43494

Actions #7

Updated by Björn Jacob over 8 years ago

  • Target version set to 6.2.16
Actions #8

Updated by Björn Jacob over 8 years ago

Example form for testing:


enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 1
postProcessor {
    1 = mail
    1 {
        recipientEmail = your@mail.com
        senderEmail = your@mail.com
        subject = Test form
    }
}
layout {
    label = <label><labelvalue /><error /><mandatory /></label>
}
10 = TEXTLINE
10 {
    type = text
    class = hasClass1
    id = hasId1
    name = salary
    placeholder = Enter your desired salary.
    filters {
        1 = currency
        1 {
            decimalPoint = .
            thousandSeparator = ,
        }
    }
    label {
        value = Salary
    }
}
20 = SUBMIT
20 {
    name = 3
    type = submit
    value = Submit form
}
rules {
    1 = required
    1 {
        breakOnError = 0
        showMessage = 1
        message = Required
        error = This field is required
        element = salary
    }
}

Actions #9

Updated by Ralf Zimmermann over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF