Project

General

Profile

Actions

Bug #89192

closed

TypoScript multi-line value syntax in is broken in Backend Layout

Added by Sebastian Michaelsen about 5 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2019-09-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Consider the following Backend Layout:

mod.web_layout.BackendLayouts.infoPage {
  title = Info Page
  config.backend_layout {
    colCount = 1
    rowCount = 1
    rows {
      1.columns.1 {
        name = Content Area
        colPos = 0
        allowed.CType (
          gridelements_pi1,
          list,
          shortcut,
          text,
        )
      }
    }
  }
}

The multi-line value for allowed.CType is perfectly valid and correctly parsed by TYPO3. However \TYPO3\CMS\Backend\Provider\PageTsBackendLayoutDataProvider->generateBackendLayoutFromTsConfig tries to reconstruct the original TSconfig from the parsed array and assumes all values are one-line values with = syntax.

The reconstructed TSconfig then looks like this (in Xdebug)

backend_layout.colCount = 1
backend_layout.rowCount = 1
backend_layout.rows.1.columns.1.name = Content Area
backend_layout.rows.1.columns.1.colPos = 0
backend_layout.rows.1.columns.1.allowed.CType =           gridelements_pi1,
          list,
          shortcut,
          text

Resulting in only gridelements_pi1 to be allowed.

A possible solution could be to strip all line breaks while reconstructing the TSconfig.

Workaround: Do not use the multi-line value syntax in Backend Layouts.

This affects at least TYPO3 8 to 10.

Actions #1

Updated by Sebastian Michaelsen about 5 years ago

  • Description updated (diff)
Actions #2

Updated by Georg Ringer about 5 years ago

  • Status changed from New to Needs Feedback
Actions #3

Updated by Georg Ringer about 5 years ago

  • Status changed from Needs Feedback to Accepted
Actions #4

Updated by Georg Ringer 6 months ago

  • Status changed from Accepted to Needs Feedback

I can't reproduce this. IMHO this is some dead code in the DataProvider as $data['config.']['backend_layout.'] is never filled?

can you reproduce issues still in v12 or v13?

Actions #5

Updated by Georg Ringer 4 months ago

  • Status changed from Needs Feedback to Closed

closing issue as lack of feedback and seems to be solved.
if you don't agree, please contact me via slack

Actions

Also available in: Atom PDF