Project

General

Profile

Actions

Bug #46094

closed

Mailform shows recipient email address on website

Added by Florian Seirer almost 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Category:
Content Rendering
Target version:
Start date:
2013-03-07
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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>
Actions #1

Updated by Franz Geiger almost 12 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

Actions #2

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?

Actions #3

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.

Actions #4

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
Actions #5

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

Actions #6

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.

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

Updated by Francois Suter over 11 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF