Bug #83809
closedckeditor: custom config not loaded in flexform / problem determining pid
100%
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
Updated by Andreas Kiessling about 6 years ago
- Tags changed from ckeditor to ckeditor, flexform
Updated by Michael Gaier about 6 years ago
- File Provide__effectivePid__for_flex_forms_segment__83809.patch Provide__effectivePid__for_flex_forms_segment__83809.patch added
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.
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.
Updated by Vendy Tjung almost 6 years ago
- Related to Bug #81748: custom yaml not loaded in flexform field for cke editor added
Updated by Patrick Lenk over 5 years ago
I can also confirm that the patch work with TYPO3 8.7.19.
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
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
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
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
Updated by Anonymous over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8fc01bb9a19d0fa889720aa7baebd5b2bb90a4b4.
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
Updated by Anonymous over 5 years ago
- Status changed from Under Review to Resolved
Applied in changeset d16606b363d21e19cecf3cd1269183ac146343ad.
Updated by Benni Mack almost 5 years ago
- Status changed from Resolved to Closed