From c68381f678580c2db31bf27364be6744dd062818 Mon Sep 17 00:00:00 2001 From: Claus Due Date: Thu, 28 Sep 2023 12:40:01 +0200 Subject: [PATCH] [BUGFIX] Remove "images" from softref parsers list in Text element This parser only exists if the "images in RTE" extension is loaded. On all other sites this causes a log entry warning of a non-existing parser. Since "images in RTE" is 100% opt-in, Flux is adjusted to fit the more common use case - users who use "images in RTE" must manually configure any "Text" fields manually by setting the "config" property on the flux:field.text tag with a key "softref" and set the value to your desired list of softref parsers, e.g. "typolink_tag,images,url". If you don't care about reference tracking then no action is necessary. --- Classes/Form/Field/Text.php | 2 +- Tests/Unit/Form/Field/TextTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Form/Field/Text.php b/Classes/Form/Field/Text.php index 8f94d0361..6c2b3bd98 100644 --- a/Classes/Form/Field/Text.php +++ b/Classes/Form/Field/Text.php @@ -32,7 +32,7 @@ public function buildConfiguration(): array $configuration['placeholder'] = $this->getPlaceholder(); if ($this->getEnableRichText()) { $configuration['enableRichtext'] = true; - $configuration['softref'] = 'typolink_tag,images,email[subst],url'; + $configuration['softref'] = 'typolink_tag,email[subst],url'; $configuration['richtextConfiguration'] = $this->getRichtextConfiguration(); } $renderType = $this->getRenderType(); diff --git a/Tests/Unit/Form/Field/TextTest.php b/Tests/Unit/Form/Field/TextTest.php index b4b9d7916..461530999 100644 --- a/Tests/Unit/Form/Field/TextTest.php +++ b/Tests/Unit/Form/Field/TextTest.php @@ -64,7 +64,7 @@ public function testBuildConfigurationWithRteResolving(): void 'eval' => 'trim', 'placeholder' => null, 'enableRichtext' => true, - 'softref' => 'typolink_tag,images,email[subst],url', + 'softref' => 'typolink_tag,email[subst],url', 'richtextConfiguration' => 'default', 'renderType' => 'rte', 'format' => '',