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.
Category:
FormEngine aka TCEforms
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
- Tags changed from ckeditor to ckeditor, flexform
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.
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.
- Related to Bug #81748: custom yaml not loaded in flexform field for cke editor added
I can also confirm that the patch work with TYPO3 8.7.19.
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Under Review
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF