Bug #59662
Problem with subsequent calls to $configurationManager->setLocalConfigurationValueByPath and 'LocalConfiguration invalid'
Status: | Closed | Start date: | 2014-06-19 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | - | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 6.2 | Is Regression: | No | |
PHP Version: | 5.4 | Sprint Focus: | ||
Complexity: |
Description
We ran into problems when using subsequent calls to
$configurationManager->setLocalConfigurationValueByPath('… any key …', '… some value …');
in AdditionalConfiguration.php.
The problem (it seems, I debugged it and came to this conclusion) is that LocalConfiguration.php is sometimes not fully written to disk when read in again.
As require(LocalConfiguration.php) … returns 1 instead of the configuration array if no return statement exists TYPO3 throws the following exception:
( ! ) Catchable fatal error: Argument 1 passed to TYPO3\CMS\Core\Utility\ArrayUtility::setValueByPath() must be an array, integer given, called in /private/var/www/typo3_src-6.2.3/typo3/sysext/core/Classes/Configuration/ConfigurationManager.php on line 229 and defined in /private/var/www/typo3_src-6.2.3/typo3/sysext/core/Classes/Utility/ArrayUtility.php on line 189 Call Stack # Time Memory Function Location 1 0.0003 657712 {main}( ) ../backend.php:0 2 0.0004 672296 require_once( '/private/var/www/typo3_src-6.2.3/typo3/init.php' ) ../backend.php:27 3 0.0197 4797200 TYPO3\CMS\Core\Core\Bootstrap->loadConfigurationAndInitialize( ???, ??? ) ../init.php:61 4 0.0204 4838976 TYPO3\CMS\Core\Core\Bootstrap->populateLocalConfiguration( ) ../Bootstrap.php:227 5 0.0204 4838976 TYPO3\CMS\Core\Configuration\ConfigurationManager->exportConfiguration( ) ../Bootstrap.php:392 6 0.0225 5027640 require( '/private/var/www/…/typo3conf/AdditionalConfiguration.php' ) ../ConfigurationManager.php:286 7 0.0231 5091192 TYPO3\CMS\Core\Configuration\ConfigurationManager->setLocalConfigurationValueByPath( string(13), string(1) ) ../AdditionalConfiguration.php:46 8 0.0242 5094104 TYPO3\CMS\Core\Utility\ArrayUtility::setValueByPath( long, string(13), string(1), ??? ) ../ConfigurationManager.php:229
I solved it in our project by creating an array at first and then using setLocalConfigurationValuesByPathValuePairs once.
I think it needs some locking mechanism here.
Related issues
History
#1 Updated by Markus Klein about 1 year ago
- Assigned To set to Christian Kuhn
@Christian: Can you please comment on that. thanks
#2 Updated by Markus Klein about 1 year ago
Wolfgang, looking at the trace: Are you writing to the LocalConfiguration in the AdditionalConfiguration file?
#3 Updated by Markus Klein about 1 year ago
- Status changed from New to Needs Feedback
If so, take a look at my comment here: https://forge.typo3.org/issues/60294#note-11
#4 Updated by Alexander Opitz 8 months ago
- Status changed from Needs Feedback to Closed
- Assigned To deleted (
Christian Kuhn)
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.