Project

General

Profile

Actions

Bug #59662

closed

Problem with subsequent calls to $configurationManager->setLocalConfigurationValueByPath and 'LocalConfiguration invalid'

Added by Wolfgang Klinger over 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-06-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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 4 (0 open4 closed)

Related to TYPO3 Core - Bug #59845: Full system crash after installing extension on a live systemClosed2014-06-24

Actions
Related to TYPO3 Core - Bug #60294: If a local file storage is outside the document root, images are sometimes not shown if multiple images are on a page.Closed2014-07-13

Actions
Related to TYPO3 Core - Bug #59432: setLocalConfigurationValueByPath() writes LocalConfiguration.php on each requestRejected2014-06-10

Actions
Related to TYPO3 Core - Bug #95111: "Feature Toggles" with file OPcaching disabled doesn't workClosed2021-09-05

Actions
Actions #1

Updated by Markus Klein over 10 years ago

  • Assignee set to Christian Kuhn

@Christian: Can you please comment on that. thanks

Actions #2

Updated by Markus Klein over 10 years ago

Wolfgang, looking at the trace: Are you writing to the LocalConfiguration in the AdditionalConfiguration file?

Actions #3

Updated by Markus Klein over 10 years 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

Actions #4

Updated by Alexander Opitz almost 10 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee 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.

Actions #5

Updated by Georg Ringer about 3 years ago

  • Related to Bug #95111: "Feature Toggles" with file OPcaching disabled doesn't work added
Actions

Also available in: Atom PDF