Project

General

Profile

Actions

Bug #25145

closed

PHP_SCRIPT_INT not working: Expected parameter $conf['scriptSuffix'] was not given.

Added by TO_Webmaster no-lastname-given over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2011-02-23
Due date:
% Done:

100%

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

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

17726.diff (1.07 KB) 17726.diff Administrator Admin, 2011-02-28 09:53
Actions #1

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.)

Actions #2

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.

Actions #3

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.

Actions #4

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
}

Actions #5

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

Actions #6

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

Actions #7

Updated by Steffen Gebert over 13 years ago

  • Status changed from New to Under Review
  • Target version deleted (0)
Actions #8

Updated by Steffen Gebert over 13 years ago

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

Updated by Steffen Gebert over 13 years ago

  • Target version set to 4.5.3
Actions #10

Updated by Oliver Hader over 13 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF