Bug #46094
closedMailform shows recipient email address on website
100%
Description
Mailform uses (abuses?) the subheader field for storing the recipient email address.
Since switching to HTML5 rendering, TYPO3 displays the email address on the website.
tt_content.mailform.10 < lib.stdheader
leads to
<hgroup> <h2>The real header</h2> <h2>recipient-email@domain.com</h2> </hgroup>
Updated by Franz Geiger over 11 years ago
As a temporal remedy you could just hide the subheader:
# don't show recipient address in mailform header tt_content.mailform.10.20.if.isFalse = 1
Updated by Francois Suter over 11 years ago
- Status changed from New to Needs Feedback
I can confirm this and that the workaround does the job. I'm not sure if we can find a cleaner solution. The better way would be to add a check to the original "if" condition (i.e lib.stdheader.20.if) so that it would return false when CType = mailform, but we don't have a "not equals" test. We have "negate", but it won't work in that case since there are other conditions.
I tried to find other solutions. My first try was:
lib.stdheader.20.if.isTrue.override = 0 lib.stdheader.20.if.isTrue.override { if.equals.field = CType if.value = mailform }
but that doesn't work, because a value of "0" for override is considered empty and thus ignored. So I would propose the following:
lib.stdheader.20.if.isFalse = 0 lib.stdheader.20.if.isFalse.override = 1 lib.stdheader.20.if.isFalse.override { if.equals.field = CType if.value = mailform }
which is kind of hacky but works. It could even turn out to be quite useful, because the "equals" test could be changed to "isInList" if other content element types should avoid rendering the subheader.
What do you think?
Updated by Patrick Broens over 11 years ago
Ouch, good catch! It's an abuse of this field.
css_styled_content got hacky on a lot of parts of the TS, so the latest solution of Francois is IMO fine. A lot of conditions are already in TS to include/exclude stuff. I also like the possibility to change "equals" to "isInList" when needed.
Updated by Francois Suter over 11 years ago
- Status changed from Needs Feedback to Accepted
- Assignee set to Francois Suter
- Target version set to next-patchlevel
- PHP Version set to 5.3
- Complexity set to easy
Updated by Gerrit Code Review over 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22391
Updated by Francois Suter over 11 years ago
A first version of the patch for 6.2 is up for review, but I thought about something more and it's a bit tricky. Please see the Gerrit review and comment there.
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22391
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23107
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23108
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23107
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/23109
Updated by Francois Suter over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 365c939aebf838dc476684a12e64137a128b7ac8.