Project

General

Profile

Actions

Bug #60995

closed

Epic #69036: EXT:form - Optimize layout rendering

tx_form PostProcessor - wrong layout handling

Added by Ralf Zimmermann over 10 years ago. Updated about 6 years ago.

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

100%

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

Description

There are some changes applied in changeset https://forge.typo3.org/projects/typo3cms-core/repository/revisions/8bd1988d82256c1851b426e1e86b04c308a3b50f
Now you can assign a layout via Typoscript to the postProcessor section, look @ #31951#note-15

The current code works with a Typoscript like

   postProcessor {
        mail {
             layout {
                  ...
             }
        }

but the correct synthax is

    postProcessor {
        1 = mail
        1 {
             layout {
                  ...
             }
        }
    }

Classes/PostProcess/PostProcessor.php don't handle that correctly.
Look at the attached patch.


Files

PostProcessor.php.diff (858 Bytes) PostProcessor.php.diff Ralf Zimmermann, 2014-08-15 14:24

Related issues 4 (0 open4 closed)

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

Actions
Related to TYPO3 Core - Feature #45742: Extension Form: Better implementation of the feature "layout" Closed2013-02-22

Actions
Related to TYPO3 Core - Bug #70086: EXT:form - Bring back view specific layout settingsClosedRalf Zimmermann2015-09-24

Actions
Has duplicate TYPO3 Core - Bug #66776: Exception Call to a member function getValue() on a non-object when tx_form is submitted with confirmation = 1Closed2015-05-03

Actions
Actions #1

Updated by Gerrit Code Review almost 10 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/35219

Actions #2

Updated by Gerrit Code Review almost 10 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/35219

Actions #3

Updated by Björn Jacob over 9 years ago

  • Category changed from Form Framework to 1602
Actions #4

Updated by Björn Jacob over 9 years ago

  • Category changed from 1602 to Form Framework
Actions #5

Updated by Björn Jacob over 9 years ago

  • Parent task set to #69036
Actions #6

Updated by Gerrit Code Review over 9 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/42607

Actions #7

Updated by Ralf Zimmermann over 9 years ago

I would like to describe the problem a little better.
With this patch
is it possible to add a global layout to the postProcessor section.

postProcessor {
    layout.label = <div><labelvalue /></div>
    ...
}

But is it not possible to add a layout to a specific postProcessor.

postProcessor {
    1 = mail
    1 {
        recipientEmail = xy@example.com
        senderEmail = xy@example.com
        layout.label = <div><labelvalue /></div>
    }
}

The behaviour should be like this:

  • If a single postProcessor has a "layout" section - use this.
  • If a single postProcessor has no "layout" section, but the global postProcessor section has a "layout" section - use this.

My previous patchset 2 was incomplete

Look at how behaves tx_form with and without old and new patch:

postProcessor {
    layout.label = <div><labelvalue /></div>
    1 = mail
    1 {
        recipientEmail = xy@example.com
        senderEmail = xy@example.com
    }
}

without old patchset 2 :
Mail: <div>Name</div> <- global processor label layout is used / OK
with old patchset 2 :
Mail: <em>Name</em> <- single processor label layout is used / NOT OK

postProcessor {
    1 = mail
    1 {
        recipientEmail = xy@example.com
        senderEmail = xy@example.com
        layout.label = <div><labelvalue /></div>
    }
}

without old patchset 2 :
Mail: <em>Name</em> <- global processor label layout is used / NOT OK
with old patchset 2 :
Mail: <div>Name</div> <- single processor label layout is used / OK

postProcessor {
    layout.label = <b><labelvalue /></b>
    1 = mail
    1 {
        recipientEmail = xy@example.com
        senderEmail = xy@example.com
    }
}

without new patchset 3 :
Mail: <b>Name</b> <- global processor label layout is used / OK
with new patchset 3 :
Mail: <b>Name</b> <- global processor label layout is used / OK

postProcessor {
    layout.label = <b><labelvalue /></b>
    1 = mail
    1 {
        recipientEmail = xy@example.com
        senderEmail = xy@example.com
        layout {
            label = <div><labelvalue /></div>
        }
    }
}

without new patchset 3 :
Mail: <b>Name</b> <- global processor label layout is used / NOT OK
with new patchset 3 :
Mail: <div>Name</div> <- single processor label layout is used / OK

Actions #8

Updated by Gerrit Code Review over 9 years ago

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

Actions #9

Updated by Gerrit Code Review about 9 years ago

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

Actions #10

Updated by Björn Jacob about 9 years ago

Tested it with the following snippet. To test the fallback process/ backward compatibility comment out the different layout.label settings.


enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 1
postProcessor {
    layout.label = <div class="global"><labelvalue /></div>
    1 = mail
    1 {
        layout.label = <div class="local"><labelvalue /></div>
        recipientEmail = your@email.com
        senderEmail = your@email.com
    }
}
10 = TEXTLINE
10 {
    name = surname
    label {
        value = Surname
    }
}
20 = SUBMIT
20 {
    name = submit
    value = submit
}

Actions #11

Updated by Gerrit Code Review about 9 years ago

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

Actions #12

Updated by Gerrit Code Review about 9 years ago

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

Actions #13

Updated by Gerrit Code Review about 9 years ago

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

Actions #14

Updated by Gerrit Code Review about 9 years ago

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

Actions #15

Updated by Gerrit Code Review about 9 years ago

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

Actions #16

Updated by Gerrit Code Review about 9 years ago

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

Actions #17

Updated by Ralf Zimmermann about 9 years ago

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

Updated by Gerrit Code Review about 9 years ago

  • Status changed from Resolved to Under Review

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/42926

Actions #19

Updated by Gerrit Code Review about 9 years ago

Patch set 2 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/42926

Actions #20

Updated by Gerrit Code Review about 9 years ago

Patch set 3 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/42926

Actions #21

Updated by Oliver Hader about 9 years ago

  • Status changed from Under Review to Resolved
Actions #22

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF