content_defender icon indicating copy to clipboard operation
content_defender copied to clipboard

PHP warning with content elements created inside a news record

Open amirarends opened this issue 1 year ago • 3 comments

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.

amirarends avatar Jul 12 '23 14:07 amirarends

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.

mbrodala avatar Nov 27 '23 16:11 mbrodala

https://github.com/IchHabRecht/content_defender/pull/143/files

amirarends avatar Nov 27 '23 17:11 amirarends

@amirarends You mean https://github.com/IchHabRecht/content_defender/pull/143

mbrodala avatar Nov 28 '23 07:11 mbrodala