Bug #47776

Configuration is no longer correctly Merged from the various Packages

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

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Configuration
Start date:
2013-05-01
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

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.

#1

Updated by Benno Weinzierl over 8 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 8 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 8 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 8 years ago

  • Status changed from New to Closed

closed on behalf of Benno.

Also available in: Atom PDF