Issue Bug Closed

#100810Site settings as colPos in BackendLayouts lead to error

David Mellen 05/04/23, 11:59 updated 07/09/24, 12:56

Description

Hi,

since I updated to v12, using constants from site settings in Page TSConfig won’t work anymore.

This is my page tsconfig:

mod {
  web_layout {
    BackendLayouts {
      default {
        title = default
        config {
          backend_layout {
            colCount = 1
            rowCount = 1
            rows {
              1 {
                columns {
                  1 {
                    name = main
                    colPos = {$backendLayouts.colPos.main}
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

and my site settings:

backendLayouts:
  colPos:
    main: 0

If I clear the cache and open a page in the backend it works, but once I reload without clearing the cache it won’t work.

The backend just shows “main(No edit access)” for the column. If I use the language comparison view I’ll get the following error:

#1476107295 TYPO3\CMS\Core\Error\Exception

PHP Warning: Undefined array key "{$backendLayouts.colPos.main}" in /var/www/html/vendor/typo3/cms-backend/Classes/ViewHelpers/LanguageColumnViewHelper.php line 34

Reviews 2