IchHabRecht / content_defender

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

colPos = 0 results in merged configuration #66

Closed FlorianStrehlau closed 4 years ago

FlorianStrehlau commented 4 years ago

[TYPO3 9.5.17 | Content Defender 3.0.12]

What I did: Tried to create a "table" element in row 4 in BE. What did I expect: Allowed to create a "table" element. What happened: Only allowed to create a "teaser" or "list" element. (only elements from row 1 column 2 are allowed)

In the following example, I configured columns for multiple rows. Basically, it seems like configs getting merged. I discovered that the issue only occurs if colPos = 0

Thanks in advance!


mod {
  web_layout {
    BackendLayouts {
      content {
        title = LLL:EXT:sitepackage/Resources/Private/Language/locallang.xlf:backend_layout.content
        config {
          backend_layout {
            colCount = 4
            rowCount = 4
            rows {

              1 {
                columns {

                  1 {
                    name = LLL:EXT:sitepackage/Resources/Private/Language/locallang.xlf
                    colPos = 1
                    colspan = 2
                    allowed {
                      CType = html, div
                    }
                  }

                  2 {
                    name = LLL:EXT:sitepackage/Resources/Private/Language/locallang.xlf
                    colPos = 0
                    colspan = 2
                    allowed {
                      CType = list, teaser
                    }
                  }
                }
              }

              2 {...}

              3 {...}

              4 {
                columns {

                  1 {
                    name = LLL:EXT:sitepackage/Resources/Private/Language/locallang.xlf
                    colPos = 4
                    colspan = 4
                    allowed {
                      CType = text, table
                    }
                  }
                }

              }
            }
          }
        }
      }
    }
  }
}
IchHabRecht commented 4 years ago

Hi @FlorianStrehlau,

I took the backend layout provided in your issue and placed it into a TYPO3 9.5 installation. Everything seems to work here as I see "Regular Text Element" and "Table" element. Would you mind to check if everything is set up properly (you removed colpos2 and colpos3 in your example) and/or any itemsProcFunc (or any other extension) is used to change the colpos "on the fly".

IchHabRecht commented 4 years ago

Hi @FlorianStrehlau,

Any update on your problem or can we close this issue?

IchHabRecht commented 4 years ago

Closing this issue because of lack of feedback.