Bug #17664
closedempty constants value is not replaced in setup at {$plugin...}
0%
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)
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'] = '';
}
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)?
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
Updated by Alexander Opitz over 11 years ago
However the problem exists with files.
Can you write the versions of TYPO3 you tested on?
Updated by Alexander Opitz over 11 years ago
- Status changed from Needs Feedback to New
Updated by Mathias Schreiber almost 10 years ago
- Target version set to 7.4 (Backend)
- Is Regression set to No
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Benni Mack about 9 years ago
- Target version changed from 7.5 to 7 LTS
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
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.