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

Error on maxitem for editors #126

Closed onza closed 1 year ago

onza commented 1 year ago

If "maxitems = 1" is set in the backend layout, only the admin can save the CE. Editors get the following error when saving:

PHP Warning: Undefined array key "sys_language_uid" in .../vendor/ichhabrecht/content-defender/Classes/Repository/ContentRepository.php line 216

TYPO3 11.5.25, current extension

Bug or wrong configuration? Anyone a hint? Thank you.

IchHabRecht commented 1 year ago

Hi @onza

I guess your editor doesn't have any rights on the language field. Can you check their restrictions?

onza commented 1 year ago

Hello @IchHabRecht Thanks for the quick response. That's how I understood the error message. I still don't understand right now, because editors are not set any restrictions regarding the language and for everything else, the editor settings work, including the allowed CTYPE. Do I - which would then be new to me - explicitly allow the editors to do something here? In any case, the "allowed_languages" setting doesn't work either.

Update: Works as expected, was actually the missing sys_language_uid setting under Page Content. I had overlooked.