Bug #47776

Configuration is no longer correctly Merged from the various Packages

Added by Benno Weinzierl over 2 years ago. Updated over 2 years ago.

Status:Closed Start date:2013-05-01
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:Configuration
Target version:TYPO3 Flow Base Distribution - 2.0
PHP Version: Complexity:
Has patch:No Affected Flow version:Git master

Description

I Noticed that since some recent change my policy yaml is completely empty. Some other Configuration Parts are missing also.

After some debugging i found out that this is due to a bug in the ConfigurationManager (Around Line 382). The configuration gets merged package by package with Arrays::arrayMergeRecursiveOverrule() which has $emptyValuesOverride = TRUE per default.

foreach ($packages as $package) {
                    $this->configurations[$configurationType] = Arrays::arrayMergeRecursiveOverrule($this->configurations[$configurationType], $this->loadPolicyConfigurationFile($package->getConfigurationPath() . $configurationType, $package), FALSE, FALSE);
                }

The Flag $emptyValuesOverride = TRUE leads to My Policy configuration beeing overwritten by later merged packages.

History

#1 Updated by Benno Weinzierl over 2 years ago

Now i additionally noticed that my main subcontext Settings.yaml is only merged partially.

It seemes to be dependant on the order of the configuration-lines in the Settings.yaml. If i change the order my one configuration is merged correctly, the other then does not work.

Here My.Firstpackage configuration is not used

TYPO3:
  Flow:
    persistence:
      backendOptions:
        ...

My:
  Firstpackage:
    someoptions:
      ...

My:
  Second:
    Package:
      otheroptions:
        ...

Here My.Second.Package configuration is not used

TYPO3:
  Flow:
    persistence:
      backendOptions:
        ...

My:
  Second:
    Package:
      otheroptions:
        ...

My:
  Firstpackage:
    someoptions:
      ...

#2 Updated by Benno Weinzierl over 2 years ago

Argh... sorry... just noticed that my last comment is a "missing feature" or "trap" that is around for a long time and completely unrelated to this issue. Please ignore it.

This works fine:

TYPO3:
  Flow:
    persistence:
      backendOptions:
        ...

My:
  Second:
    Package:
      otheroptions:
        ...

  Firstpackage:
    someoptions:
      ...

#3 Updated by Benno Weinzierl over 2 years ago

Turns out that this behaiviour is intended.

The problem in my installation was that the PackageStates.php was completely shuffled. The Flow Package was on the bottom after my package with the Policy.yaml. This resulted in the Policies beeing overruled by Flows empty Policies.

I deleted the PackageStates.php an everyting is back to normal again :-)
No clue how the order in PackageStates could be so messed up. The require-statements are.

Please close!

#4 Updated by Adrian Föder over 2 years ago

  • Status changed from New to Closed

closed on behalf of Benno.

Also available in: Atom PDF