Project

General

Profile

Actions

Bug #17664

closed

empty constants value is not replaced in setup at {$plugin...}

Added by Franz Holzinger about 17 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2007-10-10
Due date:
% Done:

0%

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

Description

If you use a Constants and set it to empty, then the string does not get replaced in setup via the {$plugin...} construct.

E.g. set the constants in constants.txt of tt_products to # cat=plugin.products//; type=int+; label=list of allowed pids: Use the root page id of your store items and also set recursive
pid_list =

and the setup to
pid_list = {$plugin.tt_products.pid_list}

In the FE this pid_list will not be replaced to the empty string from the constants which it should have been. This works fine, if the constants has a value.

(issue imported from #M6483)

Actions #1

Updated by Franz Holzinger about 17 years ago

This workaround must be used at the moment for every constants which might be left empty.

if ($this->conf['pid_list'] == '{$plugin.tt_products.pid_list}')    {
$this->conf['pid_list'] = '';
}
Actions #2

Updated by Alexander Opitz over 11 years ago

  • Category deleted (Communication)
  • 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 #3

Updated by Franz Holzinger over 11 years ago

This now works for string constants. However the problem exists with files.

Constants:

plugin.tx_mytest {

  # cat=plugin.tx_mytest/file; type=file[html,htm,tmpl,txt]; label= Template File: HTML-template file

  file.templateFile = EXT:mytest/template/frontend_tmpl.html
}

If an extension mytest is installed, then there are 2 cases

1. The file "frontend_tmpl.html" does not exists.
2. The file "frontend_tmpl.html" does exist.

Then the result Setup in the TypoScript Object Browser will be (and in the $conf of the extension):
1.

templateFile = {$plugin.tx_mytest.file.templateFile}

2.

templateFile = typo3conf/ext/mytest/template/frontend_tmpl.html

The behaviour for the first case is bad. It gives no information that the file has not been found. And the extension has no information, what went wrong. And it is nowhere documented.

It should behave like this:

1.

templateFile =

Make it empty.

Or

1.

templateFile = ERROR not found: typo3conf/ext/mytest/template/frontend_tmpl.html

Or

1.

templateFile = ERROR mytest not installed: typo3conf/ext/mytest/template/frontend_tmpl.html

Actions #4

Updated by Alexander Opitz over 11 years ago

However the problem exists with files.

Can you write the versions of TYPO3 you tested on?

Actions #5

Updated by Franz Holzinger over 11 years ago

TYPO3 6.0.4

Actions #6

Updated by Alexander Opitz over 11 years ago

  • Status changed from Needs Feedback to New
Actions #7

Updated by Mathias Schreiber almost 10 years ago

  • Target version set to 7.4 (Backend)
  • Is Regression set to No
Actions #8

Updated by Susanne Moog over 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #9

Updated by Benni Mack about 9 years ago

  • Target version changed from 7.5 to 7 LTS
Actions #10

Updated by Mathias Schreiber about 9 years ago

  • Target version deleted (7 LTS)
Actions #11

Updated by Riccardo De Contardi about 9 years ago

  • Category set to TypoScript
Actions #12

Updated by Riccardo De Contardi over 8 years ago

I performed a test with both 6.2.19 and the latest master 8.1-dev

The test:

TS Constants:

plugin.tx_mytest {
  file.templateFile = EXT:mytest/template/frontend_tmpl.html
}

TS setup:

plugin.tx_mytest {
  templateFile = {$plugin.tx_mytest.file.templateFile}
}

note that the plugin does not even exist.

Results:

a) TYPO3 6.2.19 > TSOB:

[plugin]
   [tx_mytest]
      [templateFile] = {$plugin.tx_mytest.file.templateFile}

b) TYPO3 8.1-dev (latest master) > TSOB:

[plugin]
   [tx_mytest]
      [templateFile] = EXT:mytest/template/frontend_tmpl.html
Actions #13

Updated by Riccardo De Contardi over 8 years ago

7.6.6 behaves like master.

Actions #14

Updated by Anja Leichsenring almost 8 years ago

  • Status changed from New to Closed

no problem in current branches, fixed since 7.6. Not critical for 6.2, so I close this issue.

Actions

Also available in: Atom PDF