Project

General

Profile

Actions

Bug #83809

closed

ckeditor: custom config not loaded in flexform / problem determining pid

Added by Andreas Kiessling about 6 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2018-02-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
ckeditor, flexform
Complexity:
Is Regression:
Sprint Focus:

Description

When a new preset is configured with "RTE.default.preset = myCustomPreset", any "default" RTE should receive the myCustomPreset instead.
The merging / overlaying in \TYPO3\CMS\Core\Configuration\Richtext::getConfiguration relies on the pid to determine the custom config to load.
But somehow, in a flexform context, the pid is 0, thus the default config will be loaded.

I managed to work around this problem in my case by putting the config in the ext_localconf.php and registering it via \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig, but this only works, if you don't need to switch the default e.g. on multitree / multidomain setups.


Files


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #81748: custom yaml not loaded in flexform field for cke editorClosed2017-06-29

Actions
Actions #1

Updated by Andreas Kiessling about 6 years ago

  • Tags changed from ckeditor to ckeditor, flexform
Actions #2

Updated by Michael Gaier about 6 years ago

I think, I found a solution.

The `\TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess` creates a new context `$inputToFlexFormSegment` before rendering flex forms, but does not set the `effectivePid` from the parent context.
Therefore the `pid` in `\TYPO3\CMS\Core\Configuration\Richtext::getConfiguration` is 0 and no custom config is loaded, because you can not have `pageTsConfig` on pid 0.

Actions #3

Updated by Vendy Tjung almost 6 years ago

Michael Gaier wrote:

I think, I found a solution.

The `\TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess` creates a new context `$inputToFlexFormSegment` before rendering flex forms, but does not set the `effectivePid` from the parent context.
Therefore the `pid` in `\TYPO3\CMS\Core\Configuration\Richtext::getConfiguration` is 0 and no custom config is loaded, because you can not have `pageTsConfig` on pid 0.

I can confirm the changes work on TYPO3 version 8.7.

Actions #4

Updated by Vendy Tjung almost 6 years ago

  • Related to Bug #81748: custom yaml not loaded in flexform field for cke editor added
Actions #5

Updated by Patrick Lenk over 5 years ago

I can also confirm that the patch work with TYPO3 8.7.19.

Actions #6

Updated by Gerrit Code Review over 5 years 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/58797

Actions #7

Updated by Gerrit Code Review over 5 years 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/58797

Actions #8

Updated by Gerrit Code Review over 5 years 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/58797

Actions #9

Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58797

Actions #10

Updated by Anonymous over 5 years ago

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

Updated by Gerrit Code Review over 5 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58823

Actions #12

Updated by Anonymous over 5 years ago

  • Status changed from Under Review to Resolved
Actions #13

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF