content_defender
content_defender copied to clipboard
PHP warning with content elements created inside a news record
Had a warning issue during inserting a new news record in TYPO3 v11 and PHP8.0.
In our configuration we use the news extension with the possibility to add content elements to the field "content_elements": https://docs.typo3.org/p/georgringer/news/main/en-us/Tutorials/Templates/RenderContentElements/Index.html
In this case, TYPO3 can not provide the colPos, because it is not existent.
All tt_content-records which are created inside a news record, are saved with colPos=0 in DB.
I can confirm the same issue for custom records which have an inline
field for tt_content
records.
The setup triggering the error uses overrideChildTca
to limit the visible textmedia
fields via showitem
. Here we do not have colPos
ATM. TYPO3 itself deals with this just fine though.
In any case we avoid the warning by adding colPos
to the showitem
list.
https://github.com/IchHabRecht/content_defender/pull/143/files
@amirarends You mean https://github.com/IchHabRecht/content_defender/pull/143