Bug #54371

Property "value" of cObject TEXT misses stdWrap

Added by Stefan Froemken over 8 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
TypoScript
Target version:
Start date:
2013-12-13
Due date:
% Done:

100%

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

Description

Hello guys,

http://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Text/Index.html

There are no stdWrap-Properties in TEXT-cObject on property value:

public function render($conf = array()) {
    $content = '';
    if (is_array($conf) && isset($conf['value'])) {
        $content = $conf['value'];
        unset($conf['value']);
    }
    if (count($conf)) {
        $content = $this->cObj->stdWrap($content, $conf);
    }
    return $content;
}

Stefan

#1

Updated by Chris topher over 8 years ago

This is in fact not a mistake in the documentation, but a bug in the system. Before #24063 stdWrap was present also for .value and the aim of issue 24063 was not to remove stdWrap, but to "optimize usage", meaning to optimize the number of calls to the stdWrap function(s). Actually, this and all the other associated issues even did the opposite of removing: They added stdWrap to almost every place. The question whether stdWrap shouldn't then also be present for .value, has also been discussed at that time already and as far as I see the result was that the stdWrap should not be missing for .value. Only has this bug not been fixed yet. Accordingly I'll move this issue to the Core bugtracker for further treatment.

#2

Updated by Chris topher over 8 years ago

  • Subject changed from There are no stdWrap-Probs on value in TEXT-cObject to Property "value" of cOjbect TEXT misses stdWrap
#3

Updated by Chris topher over 8 years ago

  • Project changed from Documentation to TYPO3 Core
#4

Updated by Chris topher over 8 years ago

  • Subject changed from Property "value" of cOjbect TEXT misses stdWrap to Property "value" of cObject TEXT misses stdWrap
  • PHP Version set to 5.5
  • Is Regression set to No
  • TYPO3 Version set to 6.1

The fix should be fairly simple: In frontend\Classes\ContentObject\TextContentObject.php, before the stdWrap for $conf, add lines like this

if (isset($conf['value.'])) { $content = $this->cObj->stdWrap($content, $conf['value.']); }
#5

Updated by Markus Klein over 8 years ago

  • Category set to TypoScript
  • Status changed from New to Accepted
  • Assignee set to Markus Klein
  • Target version set to next-patchlevel
  • TYPO3 Version changed from 6.1 to 6.0
#6

Updated by Gerrit Code Review over 8 years ago

  • Status changed from Accepted 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 https://review.typo3.org/26445

#7

Updated by Helmut Hummel over 8 years ago

Chris topher wrote:

This is in fact not a mistake in the documentation, but a bug in the system. Before #24063 stdWrap was present also for .value

From reading the code, I doubt, that. .value never head stdWrap capabilities.

10 = TEXT
10.value.field = header

was never possible and I really ask myself if we need to support that.

The question whether stdWrap shouldn't then also be present for .value, has also been discussed at that time already and as far as I see the result was that the stdWrap should not be missing for .value.

Well, yes. I has been stated that "It makes little sense" but there was agreement to do so and deprecate the HTML element at the same time (which happened indeed).

So fine for this "weird" construct, fix is easy enough.

#8

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 https://review.typo3.org/26445

#9

Updated by Gerrit Code Review over 8 years ago

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

#10

Updated by Gerrit Code Review over 8 years ago

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

#11

Updated by Markus Klein over 8 years ago

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

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF