IchHabRecht / content_defender

Define allowed or denied content element types in your backend layouts
GNU General Public License v2.0
81 stars 38 forks source link

PHP Warning with one backend_layout column #139

Closed ps-pixelpublic closed 1 year ago

ps-pixelpublic commented 1 year ago

issue

If only one column in backend_layout exists, opening a contentelement will show PHP warning, thrown in TcaColPosItems.php at line 62.

Warning

Core: Error handler (BE): PHP Warning: Undefined array key 1 in /var/www/html/vendor/ichhabrecht/content-defender/Classes/Form/FormDataProvider/TcaColPosItems.php line 62

System

PHP: 8.1.13 TYPO3: 12.4.1 container: 2.2.2 content_defender: 3.3.0

BackendLayout

mod.web_layout.BackendLayouts.standard {
  title = Standard
  config {
      backend_layout {
          colCount = 1
          rowCount = 1
          rows {
              1 {
                  columns {
                      1 {
                          name = Inhalt
                          colPos = 0
                      }
                  }
              }
          }
      }
  }
}
peter-neumann-dev commented 1 year ago

Already fixed with #133, but not released yet.

@ps-pixelpublic I had the same issue even with more than one column … until next release I patched this with cweagans/composer-patches and the PR mentioned above

IchHabRecht commented 1 year ago

As the latest version 3.4.1 was released today, I close this issue as resolved.