Project

General

Profile

Actions

Bug #80778

closed

CKeditor inserts empty paragraphs in FlexForms

Added by R3 H6 about 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Start date:
2017-04-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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">&lt;p&gt;a&lt;/p&gt;

&lt;p&gt;b&lt;/p&gt;

&lt;p&gt;c&lt;/p&gt;
</value>
                </field>
            </language>
        </sheet>

Saving 2nd time:

        <sheet index="5d7ebe118aa5b02493a1e5fc2989fae4">
            <language index="lDEF">
                <field index="settings.finishers.Confirmation.message">
                    <value index="vDEF">&lt;p&gt;a&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;b&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;c&lt;/p&gt;
</value>
                </field>
            </language>
        </sheet>


Files

test.zip (4.88 KB) test.zip Jan Kornblum, 2019-06-18 10:42

Related issues 4 (1 open3 closed)

Related to TYPO3 Core - Bug #79216: rte_ckeditor generates empty lines between paragraphsClosed2017-01-09

Actions
Related to TYPO3 Core - Bug #81893: ck_editor: Linefeeds added after each saveNew2017-07-17

Actions
Related to TYPO3 Core - Bug #81952: CKeditor inserts just in Workspace empty paragraphs in FlexFormsClosed2017-07-24

Actions
Related to TYPO3 Core - Bug #89923: Empty p-Tag appended to RTE fields after saveClosed2019-12-11

Actions
Actions #1

Updated by Patric Schumann about 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

Actions #2

Updated by R3 H6 about 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.

Actions #3

Updated by Simon Würstle almost 7 years ago

I can confirm this issue with powermail plugin flexform fields (TYPO3 8.7.1)

Actions #4

Updated by Marcelo Vetter almost 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

Actions #5

Updated by Lars Houmark almost 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.

Actions #6

Updated by Benni Mack almost 7 years ago

  • Target version changed from 8 LTS to next-patchlevel
Actions #7

Updated by Christian Kuhn almost 7 years ago

  • Related to Bug #79216: rte_ckeditor generates empty lines between paragraphs added
Actions #8

Updated by Riccardo De Contardi over 6 years ago

  • Related to Bug #81893: ck_editor: Linefeeds added after each save added
Actions #9

Updated by dermueller no-lastname-given over 6 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>
Actions #10

Updated by R3 H6 over 6 years ago

Insert the config

<enableRichtext>1</enableRichtext>

solved the problem for me as well.

Actions #11

Updated by Riccardo De Contardi over 6 years ago

  • Related to Bug #81952: CKeditor inserts just in Workspace empty paragraphs in FlexForms added
Actions #12

Updated by Frank no-lastname-given about 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>&nbsp;</p>
<p>more text

or:

text</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</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

Actions #13

Updated by Andreas Kienast over 5 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

Actions #14

Updated by Benni Mack about 5 years ago

  • Target version changed from next-patchlevel to Candidate for patchlevel
Actions #15

Updated by Jan Kornblum almost 5 years ago

Adding `<enableRichtext>1</enableRichtext>` doesn't solve the problem for me at a plugins flexform field in 8.7.13.

Actions #16

Updated by Jan Kornblum almost 5 years ago

...and even in 9.5.4 this isn't solved yet.

Actions #17

Updated by Gerrit Code Review almost 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

Actions #18

Updated by Gerrit Code Review almost 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

Actions #19

Updated by Gerrit Code Review almost 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

Actions #20

Updated by Gerrit Code Review almost 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

Actions #21

Updated by Benni Mack almost 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?

Actions #22

Updated by DMK E-BUSINESS GmbH almost 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.

Actions #23

Updated by Jan Kornblum almost 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.

Actions #24

Updated by Gerrit Code Review almost 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

Actions #25

Updated by Gerrit Code Review almost 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

Actions #26

Updated by Benni Mack almost 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #27

Updated by Gerrit Code Review almost 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

Actions #28

Updated by Benni Mack almost 5 years ago

  • Status changed from Under Review to Resolved
Actions #29

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions #30

Updated by JZ no-lastname-given over 4 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

Actions #31

Updated by Benni Mack about 4 years ago

  • Related to Bug #89923: Empty p-Tag appended to RTE fields after save added
Actions

Also available in: Atom PDF