Actions
Bug #89429
openEmpty p tags added in RTE when changing type "passthrough" to "text" via "columnsOverrides"
Status:
New
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2019-10-16
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
rte, rte_ckeditor, passthrough, columnsOverrides, cType
Complexity:
hard
Is Regression:
Sprint Focus:
Description
To reproduce:
1) Add a new (but disabled with type "passthrough") text field for e.g. tt_content:
$tempColumns = [ 'tx_myext_text' => [ 'exclude' => 1, 'label' => 'Text', 'config' => [ 'type' => 'passthrough', 'cols' => 40, 'rows' => 15, 'enableRichtext' => 1, 'richtextConfiguration' => 'default', ], ], ]; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $tempColumns, 0); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( 'tt_content', 'tx_myext_text', '', 'after:CType' );
2) Change this field to type "text" in "columnsOverrides" for a specific content element:
$GLOBALS['TCA']['tt_content']['types']['textpic'] = array_replace_recursive( $GLOBALS['TCA']['tt_content']['types']['textpic'], [ 'columnsOverrides' => [ 'tx_myext_text' => [ 'config' => [ 'type' => 'text', ], ], ], ] );
3) Create a new content element "textpic" in TYPO3 BE, write some text into this new RTE textfield. Important: Text must have more than one paragraph (e.g. <p>aaa</p><p>bbb</p>)
4) Save this content element several times.
5) Result: Every time you save, an empty p-tag is added:
<p>aaa</p> <p> </p> <p> </p> <p>bbb</p>
This bug occures both in macOS and Windows 10, both TYPO3 8 and TYPO3 9.
Actions