Issue Bug Closed

#92892RTE in TCA of type='flex' in combination with type='array' in flexform adds empty <p>&nbsp ;</p>

Paul Kamma 11/20/20, 15:19 updated 07/04/24, 09:36

Description

I have the following setup to extend a TCA of a Model

$GLOBALS['TCA']['tx_myExtension_domain_model_event']['columns']['attributes']['config'] = [
    'type' => 'flex',
    'ds' => [
        'default' => 'FILE:EXT:myExtension/Configuration/FlexForms/event.xml',
    ],
];

the flexForm looks like this:

<T3DataStructure>
  <ROOT>
    <type>array</type>
    <el>
      <attributes>
        <TCEforms>
          <section>1</section>
          <title>Attributes</title>
          <type>array</type>
          <el>
            <attribute>
              <title>Attribute</title>
              <type>array</type>
              <el>
                <info>
                  <TCEforms>
                    <label>Copy</label>
                    <config>
                      <type>text</type>
                      <rows>5</rows>
                      <cols>30</cols>
                      <eval>trim</eval>
                      <enableRichtext>true</enableRichtext>
                    </config>
                  </TCEforms>
                </info>
              </el>
            </attribute>
          </el>
        </TCEforms>
      </attributes>
    </el>
  </ROOT>
</T3DataStructure>
When I add a “Attribute” element within the Section and type text with two paragraphs. After saving the RTE creates an Additional paragraph between the two inserted with

&nbsp ;

.
Looks like that it the

&nbsp ;

appears when it converts the empty lines to the empty paragraphs. They are not written in the DB.

Reviews 1