Bug #88858

Richtext configuration set in a flexform gets overwritten by RTE.default.preset

Added by Jan Kornblum 4 months ago. Updated 1 day ago.

Status:
Accepted
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2019-07-30
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
rte
Complexity:
Is Regression:
Sprint Focus:

Description

A richtext configuration is set in a flexform (attached to pi_flexform) field:

<settings.anyRichtextField>
    <exclude>1</exclude>
    <label>Custom RTE enabled field</label>
    <config>
        <type>text</type>
        <rows>5</rows>
        <cols>30</cols>
        <eval>trim,required</eval>
        <enableRichtext>1</enableRichtext>
        <richtextConfiguration>custom_config</richtextConfiguration>
    </config>
</settings.anyRichtextField>

As long as no global RTE preset is set anywhere else, the configuration is loaded fine. But as soon as...

RTE.default.preset = minimal

...is set anywhere else, the per-flexform-field rte configuration gets ignored. Also, it is not possible to explicitly set the preset by tsconfig like this additionally...

TCEFORM.[tableName].[fieldName].[dataStructureKey].[flexSheet].[flexFieldName].[propertyName] 

...due to limitations of the "config" section mentioned here: https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/PageTsconfig/TceForm.html


Related issues

Related to TYPO3 Core - Bug #88655: richtextConfiguration, set via TCA for a text field is ignored Resolved 2019-06-29

Associated revisions

Revision e89e1a5a (diff)
Added by Daniel Siepmann 3 days ago

[DOCS] Fix RTE preset example

The example for overwriting preset of a single field for specific type
(e.g. CType) was wrong. This is now fixed.

Also All examples were modified to create a better readable list to be
read from less specific to most specific with separated examples for
syntax and real world usage.

Resolves: #88858
Releases: master, 9.5
Change-Id: I759a606360b4e612e734cf70b7b992718d683dc9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62251
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Reviewed-by: Benni Mack <>

Revision 6fe57280 (diff)
Added by Daniel Siepmann 3 days ago

[DOCS] Fix RTE preset example

The example for overwriting preset of a single field for specific type
(e.g. CType) was wrong. This is now fixed.

Also All examples were modified to create a better readable list to be
read from less specific to most specific with separated examples for
syntax and real world usage.

Resolves: #88858
Releases: master, 9.5
Change-Id: I759a606360b4e612e734cf70b7b992718d683dc9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62220
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Jan Kornblum 4 months ago

  • Description updated (diff)
  • Category changed from FormEngine aka TCEforms to RTE (rtehtmlarea + ckeditor)

#2 Updated by Daniel Kirsch 25 days ago

  • Tags set to rte

TYPO3 v9 also affected.

Easy example:

RTE {
    default.preset = full
    config {
        tx_news_domain_model_news.preset = minimal
        tt_content.type.textmedia.preset = default
    }
}

#3 Updated by Benni Mack 5 days ago

Daniel Kirsch, the syntax you provided is not correct.

This is the correct syntax for regular fields:


RTE {
    default.preset = full
    config {
       # override for one field
        tt_content.bodytext.preset = normal
      # override for one field of a specific type
        tt_content.bodytext.types.textmedia.preset = minimal
    }
}

#5 Updated by Daniel Siepmann 4 days ago

  • Assignee set to Daniel Siepmann

#6 Updated by Gerrit Code Review 4 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/+/62251

#7 Updated by Gerrit Code Review 3 days 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/+/62220

#8 Updated by Daniel Siepmann 3 days ago

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

#9 Updated by Benni Mack 3 days ago

  • Related to Bug #88655: richtextConfiguration, set via TCA for a text field is ignored added

#10 Updated by Benni Mack 3 days ago

  • Status changed from Resolved to Accepted

I keep this open as this is currently not supported to override FlexForms via PageTS.

#11 Updated by Jan Kornblum 2 days ago

Thanks for fixing! So the first issue is fixed (custom flexform rte config won't get overwritten by global tsconfig any longer), but the second issue (overwrite rte config for flexform field by tsconfig) is still open?

#12 Updated by Ioulia Kondratovitch 1 day ago

I have found 2 mistakes and left my comments in the patch (can't set review = -1, since it's megred).
How to proceed? Are the comments enough or should I create a new ticket?

Daniel Siepmann wrote:

Applied in changeset e89e1a5a1c08e4878e9182814d98895d75545ebf.

Also available in: Atom PDF