Bug #89923

Empty p-Tag appended to RTE fields after save

Added by Susanne Haberpointner almost 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2019-12-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello,

I have a problem in an extbase extension with using CKEditor for FlexForm fields, where you can dynamically add elements (defined here: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/DataFormats/T3datastructure/Elements/Index.html#elements-containing-values-value-elements)
When adding an instance and entering more than 1 line of text/hitting enter after the first line, an additional line feed <p> </p> is added after
each line and every <br /> Tag is converted into a <p></p> tag.

I already tried various different configs for the CKEditor, including setting autoParagraph to false, but to no avail.

TYPO3 Version: 9.5.16

Example:

- before saving

<p>Example 1</p>

<p>Example 2</p>

- after first saving

<p>Example 1</p>

<p>&nbsp;</p>

<p>Example 2</p>

- after second saving

<p>Example 1</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>Example 2</p>

Flexform-Configuration:

<T3DataStructure>
    <meta>
        <langDisable>1</langDisable>
    </meta>
    <sheets>
        <sDEF>
            <ROOT>
                <TCEforms>
                    <sheetTitle>
                        Settings
                    </sheetTitle>
                </TCEforms>
                <type>array</type>
                <el>
                    <funktion>
                        <TCEforms>
                            <section>1</section>
                            <type>array</type>
                            <el>
                                <point>
                                    <title>Point</title>
                                    <type>array</type>
                                    <el>
                                        <bodytext>
                                            <TCEforms>
                                                <label>Text</label>
                                                <config>
                                                    <type>text</type>
                                                    <row>5</row>
                                                    <cols>48</cols>
                                                    <enableRichtext>1</enableRichtext>
                                                </config>
                                            </TCEforms>
                                        </bodytext>
                                    </el>
                                </point>
                            </el>
                        </TCEforms>
                    </funktion>
                </el>
            </ROOT>
        </sDEF>
    </sheets>
</T3DataStructure>


Related issues

Related to TYPO3 Core - Bug #80778: CKeditor inserts empty paragraphs in FlexFormsClosed2017-04-09

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

Actions
#1

Updated by Bastian Bringenberg almost 2 years ago

  • Project changed from forge.typo3.org to TYPO3 Core
  • TYPO3 Version set to 8

Moved to correct project and changed TYPO3 Version.

#2

Updated by Susanne Haberpointner almost 2 years ago

  • Description updated (diff)
  • PHP Version set to 7.2
#3

Updated by Riccardo De Contardi almost 2 years ago

maybe this is related? #81893

#4

Updated by Susanne Haberpointner almost 2 years ago

Riccardo De Contardi wrote:

maybe this is related? #81893

yes, this seems to be a similar issue, but my issue only occurs while using ckeditor in connection with flexform. there also seems to be no activity/possible solution there.

#5

Updated by Benni Mack almost 2 years ago

  • Status changed from New to Needs Feedback

Hey Susanne,

can you let us know which TYPO3 v8 version you're exactly using.

The described behaviour has been fixed in August 2019 (see https://review.typo3.org/c/Packages/TYPO3.CMS/+/60902)

#6

Updated by Benni Mack almost 2 years ago

  • Related to Bug #80778: CKeditor inserts empty paragraphs in FlexForms added
#7

Updated by Riccardo De Contardi over 1 year ago

  • Category set to RTE (rtehtmlarea + ckeditor)
#8

Updated by Susanne Haberpointner over 1 year ago

Benni Mack wrote:

Hey Susanne,

can you let us know which TYPO3 v8 version you're exactly using.

The described behaviour has been fixed in August 2019 (see https://review.typo3.org/c/Packages/TYPO3.CMS/+/60902)

Hello,

the TYPO3 version we used was 8.7.32.
We since upgraded to version 9.5.16, but unfortunately the problem still exists.

Thanks in advance for your reply.

#9

Updated by Susanne Haberpointner over 1 year ago

  • TYPO3 Version changed from 8 to 9
#10

Updated by Susanne Haberpointner over 1 year ago

  • Description updated (diff)
#11

Updated by Florian Michel over 1 year ago

We had exactly the same issue. After investigating the configuration in pageTS, we found an old RTE configuration option that was causing this problem:

RTE.default.proc.overruleMode = ts_css

After we commented this out as a test, the additional line-break after saving a text content element was gone...

The issue occured not only in an extension or flexform field, but in core elements (text, textmedia, etc.) as well. Maybe this helps others dealing with this annoying problem.

#12

Updated by Riccardo De Contardi over 1 year ago

It looks like that this is indeed related to #81893. On both cases the problem lies in the "ts_css mode"; it looks like it has been removed here:

https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.0/Breaking-80700-DeprecatedFunctionalityRemoved.html?highlight=ts_css

#13

Updated by Riccardo De Contardi about 1 year ago

  • Status changed from Needs Feedback to Closed

I think it is safe to close this issue for now (long time without feedback and seems related to a deprecated feature)

If you think that this is the wrong decision, please reopen it or ping me and I'll do

Thank you.

#14

Updated by Riccardo De Contardi about 1 year ago

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

Also available in: Atom PDF