Bug #52635

Incorrect merging of Views.yaml files from multiple Packages

Added by Marc Neuhaus almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Should have
Category:
-
Target version:
-
Start date:
2013-10-09
Due date:
% Done:

100%

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

Description

There is an issue with the way the Views.yaml files are merged in the ConfigurationManager because of the unnamed, indexed way the Views.yaml files are meant to be.

Example:

Given these two Views.yaml files form different packages:

Package1/Views.yaml

-
  requestFilter: 'isPackage("Package1.Features")'
  options:
    layoutRootPathPattern: resource://Famelo.ADU/Private/Layouts/
    templatePathAndFilename: resource://Famelo.ADU/Private/Templates/Features/Index.html

Package2/Views.yaml

-
  requestFilter: 'isPackage("TYPO3.Expose")'
  options:
    typoScriptPathPatterns:
      - 'resource://TYPO3.Expose/Private/TypoScripts/'
      - 'resource://Famelo.ADU/Private/TypoScripts/'
-
  requestFilter: 'isPackage("Package2.Foo")'
  options:
    layoutRootPathPattern: resource://Famelo.ADU/Private/Layouts/

will result in this merged configuration:

-
  requestFilter: 'isPackage("TYPO3.Expose")'
  options:
    typoScriptPathPatterns:
      - 'resource://TYPO3.Expose/Private/TypoScripts/'
      - 'resource://Famelo.ADU/Private/TypoScripts/'
    layoutRootPathPattern: resource://Famelo.ADU/Private/Layouts/
    templatePathAndFilename: resource://Famelo.ADU/Private/Templates/Features/Index.html
-
  requestFilter: 'isPackage("Package2.Foo")'
  options:
    layoutRootPathPattern: resource://Famelo.ADU/Private/Layouts/

Which in turn throw an exception, because it will try to set a templatePathAndFilename on a TypoScriptView which hasn't that option.

Possible Solution
We already discussed this briefly in IRC and agreed to create a new ConfigurationProcessingType which will append instead of merge
indexed arrays.

#1

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24526

#2

Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24526

#3

Updated by Bastian Waidelich almost 8 years ago

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

Also available in: Atom PDF