Project

General

Profile

Actions

Bug #17379

closed

Multiline constants

Added by John Angel over 17 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Won't have this time
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2007-06-12
Due date:
% Done:

0%

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

Description

Multiline values with ( ) signs work in setup.txt, but don't work in constants.txt.

Reference:
http://typo3.org/documentation/document-library/core-documentation/doc_core_ts/4.1.0/view/1/2/

(issue imported from #M5783)


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #59714: Multiline constants with '(' or ')' breakClosed2014-06-20

Actions
Actions #1

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions #3

Updated by Bas van Beek about 9 years ago

This issue is still the case in TYPO3 6.2.15. Would be really nice if constants also supports multiline.

Now I'm forced to use setup field, but then I lose the inheritance that works with constants.

Actions #4

Updated by Tymoteusz Motylewski about 8 years ago

  • Status changed from Closed to New
  • TYPO3 Version changed from 4.1 to 6.2
  • Is Regression set to No

also exists in current v8, I'm reopening the issue

Actions #5

Updated by Tymoteusz Motylewski about 8 years ago

  • Category set to TypoScript
Actions #6

Updated by Tymoteusz Motylewski about 8 years ago

How to test:

Constants

lib.multiline (
line 1
line2
line3
)

setup

page.9 = TEXT
page.9.value = {$lib.multiline}

This will output "line 1" but should all lines.

Actions #7

Updated by Tymoteusz Motylewski about 8 years ago

  • PHP Version deleted (4.3)
Actions #8

Updated by Hannes Lau about 7 years ago

  • TYPO3 Version changed from 6.2 to 8

This issue is still current in TYPO3 8.7

Actions #9

Updated by Josef Glatz over 6 years ago

  • Priority changed from Should have to Must have
  • TYPO3 Version changed from 8 to 9

This "issue" is still current in TYPO3 9.2.0-dev.

Mathias mentioned in #59714-1 that multiline TypoScript Constants are not intended. But actually there's

A clear statement would be good. We can take this into the documentation or even fix multiline constants? or maybe some warning/log when ( instead of = is used in TypoScript constants context.

Actions #10

Updated by J W over 6 years ago

I wanted to share my research:

Multiline constants actually do work (tested on latest master).
The line break and tabs are preserved.
However the constants value is replaced in the typoscript setup the linebreak will also be added causing it to be invalid typoscript.

The actual replacement happens inside the\TYPO3\CMS\Core\TypoScript\TemplateService::substituteConstants.

A constant

temp.multiTest (
Hello
  World
)

with typoscript

page.8 = TEXT
page.8.value = {$temp.multiTest}

results in

page.8 = TEXT
page.8.value = Hello
  World

So to fix this we need to change the \TYPO3\CMS\Core\TypoScript\TemplateService::substituteConstantsCallBack method to wrap the constants value in a multiline if it is multiline.

Actions #12

Updated by Anja Leichsenring over 6 years ago

  • Status changed from New to Closed
  • Priority changed from Must have to Won't have this time

no multiline constants, and documentation updated accordingly.

Actions

Also available in: Atom PDF