Bug #25145
closedPHP_SCRIPT_INT not working: Expected parameter $conf['scriptSuffix'] was not given.
100%
Description
Typo3 4.5.1 says:
Oops, an error occured!
Expected parameter $conf['scriptSuffix'] was not given.
Here are the first 2 elements of the Trace:
[0] => Array
(
[file] => /localhome/www/lib/typo3-math/typo3_src-4.5.1/typo3/sysext/cms/tslib/class.tslib_content.php
[line] => 770
[function] => render
[class] => tslib_content_PhpScriptInternal
[type] => ->
[args] => Array
(
[0] => Array
(
[file] => fileadmin/phpscripts/flag.php
)
)
)
[1] => Array
(
[file] => /localhome/www/lib/typo3-math/typo3_src-4.5.1/typo3/sysext/cms/tslib/content/class.tslib_content_template.php
[line] => 178
[function] => cObjGetSingle
[class] => tslib_cObj
[type] => ->
[args] => Array
(
[0] => PHP_SCRIPT_INT
[1] => Array
(
[file] => fileadmin/phpscripts/flag.php
)
[2] => subparts.flag
)
)
(issue imported from #M17726)
Files
Updated by Daniel Lienert over 13 years ago
Same Probleme here.
My TS:
headerimage = PHP_SCRIPT_INT
headerimage.file=fileadmin/template/scripts/random_image.php
As i understand it, $conf['scriptSuffix'] should be set in class tslib_cObj Line 1129 to (EXT|INT), but in my environment tslib_content_PhpScriptInternal->render() is called before that, so the config is not present.
(Dirty hack: Removng the InvalidArgumentException in line 46 in ./typo3/sysext/cms/tslib/content/class.tslib_content_phpscriptinternal.php will make it work again.)
Updated by Jan Radecker over 13 years ago
Agree with Daniel Lienert.
typo3/sysext/cms/tslib/content/class.tslib_content_phpscriptinternal.php checks if $conf['scriptSuffix'] is set and not empty. Otherwise it throws an exception.
This value could be set via TS like that:
headerimage = PHP_SCRIPT_INT
headerimage. scriptSuffix = INT
headerimage.file=fileadmin/template/scripts/random_image.php
...but that is not documented.
Curiously that value is not used anywhere in TYPO3.
So in my opinion it does not make sense to throw an exception for a missing value that is never used.
That check/exception should be removed.
See attached diff.
Updated by Jo Hasenau over 13 years ago
$conf['scriptSuffix'] was used when both PHP_SCRIPT_INT and PHP_SCRIPT_EXT were rendered by the same funtion.
Since PHP_SCRIPT_EXT got it's own class now, this check is useless.
Updated by taywa gmbh over 13 years ago
same here, "scriptSuffix = INT" worked as an workaround:
tt_content.script = CASE
tt_content.script {
key.field = select_key
paypal = PHP_SCRIPT_EXT
scriptSuffix = INT
paypal.file = fileadmin/template/paypal.php
}
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change I64fd656e0af78e711290aea597353c7194dd613d has been pushed to the review server.
It is available at http://review.typo3.org/1466
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change I639a8d65406473efe3a40e7efe99c31055e479e9 has been pushed to the review server.
It is available at http://review.typo3.org/1467
Updated by Steffen Gebert over 13 years ago
- Status changed from New to Under Review
- Target version deleted (
0)
Updated by Steffen Gebert over 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f6b2ac0de577968acc7456b6c2e291e748b3334f.
Updated by Oliver Hader over 13 years ago
- Status changed from Resolved to Closed