Bug #80778
closedCKeditor inserts empty paragraphs in FlexForms
100%
Description
If CKeditor is used for a FlexForm text field, empty paragraphs are added after/during saving.
The problem must be related with the line-breaks.
Example:
Saving 1st time:
<sheet index="5d7ebe118aa5b02493a1e5fc2989fae4"> <language index="lDEF"> <field index="settings.finishers.Confirmation.message"> <value index="vDEF"><p>a</p> <p>b</p> <p>c</p> </value> </field> </language> </sheet>
Saving 2nd time:
<sheet index="5d7ebe118aa5b02493a1e5fc2989fae4"> <language index="lDEF"> <field index="settings.finishers.Confirmation.message"> <value index="vDEF"><p>a</p> <p>&nbsp;</p> <p>b</p> <p>&nbsp;</p> <p>c</p> </value> </field> </language> </sheet>
Files
Updated by Patric Schumann over 7 years ago
I can see this behavior only in flux fields from the fluidtypo3 extension as stated here https://github.com/FluidTYPO3/flux/issues/1388.
When using a RTE-field configured by a flexform in a regular extbase-plugin this behavior wont show up. still have to check if the config finally gets loaded with 8.7 or if this is still buggy but thats another issue.
kind regards
Patric
Updated by Remo H. over 7 years ago
This happens in an custom form element using only core functionality.
You can grab following extension https://github.com/r3h6/TYPO3.EXT.form_confirmation_finisher and activate the rte in the yaml configuration.
Then on the form content element you can observe the behavior.
Updated by Simon Würstle over 7 years ago
I can confirm this issue with powermail plugin flexform fields (TYPO3 8.7.1)
Updated by Marcelo Vetter over 7 years ago
Simon Würstle wrote:
I can confirm this issue with powermail plugin flexform fields (TYPO3 8.7.1)
I can also confirm this issue in Powermail
Updated by Lars Houmark over 7 years ago
We had this issue mainly with DCE fields that has a RTE editor.
The following configuration in the RTE field solved it:
<config> <enableRichtext>1</enableRichtext> </config>
Maybe this should somehow be solved by the core to avoid "broken functionality" in "random" places upon upgrading.
Updated by Benni Mack over 7 years ago
- Target version changed from 8 LTS to next-patchlevel
Updated by Christian Kuhn over 7 years ago
- Related to Bug #79216: rte_ckeditor generates empty lines between paragraphs added
Updated by Riccardo De Contardi over 7 years ago
- Related to Bug #81893: ck_editor: Linefeeds added after each save added
Updated by dermueller no-lastname-given over 7 years ago
I can confirm the problem when adding CKeditor to a Gridelement via Flexform.
This code produces empty paragraphs on saving:
<?xml version="1.0" encoding="UTF-8"?> <T3DataStructure> <meta> <langDisable>0</langDisable> </meta> <ROOT type="array"> <type>array</type> <el type="array"> <text> <TCEforms type="array"> <config type="array"> <type>text</type> <cols>48</cols> <rows>5</rows> </config> <label>Text</label> <defaultExtras>richtext[*]:rte_transform[flag=rte_enabled]</defaultExtras> </TCEforms> </text> </el> </ROOT> </T3DataStructure>
BUT... the solution from Lars Houmark seems to solve it
<?xml version="1.0" encoding="UTF-8"?> <T3DataStructure> <meta> <langDisable>0</langDisable> </meta> <ROOT type="array"> <type>array</type> <el type="array"> <text> <TCEforms type="array"> <config type="array"> <type>text</type> <cols>48</cols> <rows>5</rows> <enableRichtext>1</enableRichtext> </config> <label>Text</label> <defaultExtras>richtext[*]:rte_transform[flag=rte_enabled]</defaultExtras> </TCEforms> </text> </el> </ROOT> </T3DataStructure>
Updated by Remo H. about 7 years ago
Insert the config
<enableRichtext>1</enableRichtext>
solved the problem for me as well.
Updated by Riccardo De Contardi almost 7 years ago
- Related to Bug #81952: CKeditor inserts just in Workspace empty paragraphs in FlexForms added
Updated by Frank no-lastname-given over 6 years ago
This also and definitely happens under typo3 8.7.10 with dce 1.5.2:
text</p><p>more text
becomes:
text</p> <p> </p> <p>more text
or:
text</p> <p> </p> <p> </p> <p> </p> <p>more text
Rah.
Just found while trying for a second time that the solution for dce also works here (i wondered why it wouldn't first, but it does):
<enableRichtext>1</enableRichtext>
inside typo3conf/ext/gridelements/Configuration/FlexForms/default_flexform_configuration.xml
Updated by Andreas Kienast about 6 years ago
I also found that bug in a current project, using 8.7.19.
Current case: I have a custom TCA for use in IRRE with a type and a field "bodytext" that has no configured RTE by default. In some other TCA I use that IRRE foo and enable the RTE by using columnsOverrides
.
If I enable the RTE by default, the issue disappears. It seems something goes wrong with columnsOverrides/irre_foo/config/overrideChildTca/columns/bodytext/config/enableRichtext = true
Updated by Benni Mack over 5 years ago
- Target version changed from next-patchlevel to Candidate for patchlevel
Updated by Jan Kornblum over 5 years ago
Adding `<enableRichtext>1</enableRichtext>` doesn't solve the problem for me at a plugins flexform field in 8.7.13.
Updated by Jan Kornblum over 5 years ago
...and even in 9.5.4 this isn't solved yet.
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60902
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60902
Updated by Gerrit Code Review over 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60902
Updated by Gerrit Code Review over 5 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60902
Updated by Benni Mack over 5 years ago
I found out that the issue is related to flexforms, having RTE in a sheet. When a field is not in a specific sheet (that is sDEF, as the example shows from above), all works fine.
Please please review this patch for sheets as well @Jan Schröder Kornblum, could you upload your demo extension to have people test this?
Updated by DMK E-BUSINESS GmbH over 5 years ago
We experienced the same bug in TYPO3 8.7 with gridelements (gridelement with an RTE) and CK editor. In our case the problem is not the bug found here, it's gridelements. You can find the issue here (https://gitlab.com/coderscare/gridelements/issues/46) including a patch.
Updated by Jan Kornblum over 5 years ago
Hi all! Attached you'll find the demo extension. Just install, place the plugin on any page and put some text inside the plugins rte field and save several times.
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61059
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61089
Updated by Benni Mack over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d44e84fccb90d0a3c0f3bed89143057498caba4f.
Updated by Gerrit Code Review over 5 years ago
- Status changed from Resolved to Under Review
Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61089
Updated by Benni Mack over 5 years ago
- Status changed from Under Review to Resolved
Applied in changeset eb8842b8710f55f122ca99d68be5a146f863b7f0.
Updated by Benni Mack almost 5 years ago
- Status changed from Resolved to Closed
Updated by JZ no-lastname-given almost 5 years ago
Unfortunately, I'm still facing with this bug in Typo3 v 9.5.9 (it works fine in version 8), so I just want to know if the patch has been included in Typo3 9.5.9 as well.
Analyzing my DataHandler.php file, it seems to be the case, but once again using Typo3 9.5.9 and CKE I get these empty lines in FE.
I'm not using extension like "flux", however, grid and DCE extensions are used.
Thaks in advance for your reply.
Regards
Updated by Benni Mack over 4 years ago
- Related to Bug #89923: Empty p-Tag appended to RTE fields after save added