Bug #80778

CKeditor inserts empty paragraphs in FlexForms

Added by R3 H6 about 2 years ago. Updated 8 days ago.

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

0%

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>


Related issues

Related to TYPO3 Core - Bug #79216: rte_ckeditor generates empty lines between paragraphs Closed 2017-01-09
Related to TYPO3 Core - Bug #81893: ck_editor: Linefeeds added after each save New 2017-07-17
Related to TYPO3 Core - Bug #81952: CKeditor inserts just in Workspace empty paragraphs in FlexForms Closed 2017-07-24

History

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

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

#3 Updated by Simon Würstle about 2 years ago

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

#4 Updated by Marcelo Vetter about 2 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

#5 Updated by Lars Houmark about 2 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.

#6 Updated by Benni Mack about 2 years ago

  • Target version changed from 8 LTS to next-patchlevel

#7 Updated by Christian Kuhn about 2 years ago

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

#8 Updated by Riccardo De Contardi almost 2 years ago

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

#9 Updated by dermueller no-lastname-given almost 2 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>

#10 Updated by R3 H6 over 1 year ago

Insert the config

<enableRichtext>1</enableRichtext>

solved the problem for me as well.

#11 Updated by Riccardo De Contardi over 1 year ago

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

#12 Updated by Frank no-lastname-given over 1 year 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

#13 Updated by Andreas Fernandez 8 months 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

#14 Updated by Benni Mack about 2 months ago

  • Target version changed from next-patchlevel to Candidate for patchlevel

#15 Updated by Jan Kornblum 10 days ago

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

#16 Updated by Jan Kornblum 10 days ago

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

#17 Updated by Gerrit Code Review 9 days 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

#18 Updated by Gerrit Code Review 8 days 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

#19 Updated by Gerrit Code Review 8 days 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

Also available in: Atom PDF