Bug #83809

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

Added by Andreas Kiessling over 1 year ago. Updated 19 days ago.

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

100%

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.

Provide__effectivePid__for_flex_forms_segment__83809.patch View (1.57 KB) Michael Gaier, 2018-03-05 16:14


Related issues

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

Associated revisions

Revision 8fc01bb9 (diff)
Added by Patrick Lenk 7 months ago

[BUGFIX] Provide effectivePid for flexforms segment

Custom ckeditor config is now loaded in flexforms.

Resolves: #83809
Related: #81748
Releases: master, 8.7
Change-Id: I9c0fe85d81f3e34209cd52afee18594e49020f54
Reviewed-on: https://review.typo3.org/58797
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Reviewed-by: Wouter Wolters <>
Tested-by: Benni Mack <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

Revision d16606b3 (diff)
Added by Patrick Lenk 7 months ago

[BUGFIX] Provide effectivePid for flexforms segment

Custom ckeditor config is now loaded in flexforms.

Resolves: #83809
Related: #81748
Releases: master, 8.7
Change-Id: I9c0fe85d81f3e34209cd52afee18594e49020f54
Reviewed-on: https://review.typo3.org/58823
Tested-by: TYPO3com <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Andreas Kiessling over 1 year ago

  • Tags changed from ckeditor to ckeditor, flexform

#2 Updated by Michael Gaier about 1 year 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.

#3 Updated by Vendy Tjung 12 months 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.

#4 Updated by Vendy Tjung 12 months ago

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

#5 Updated by Patrick no-lastname-given 7 months ago

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

#6 Updated by Gerrit Code Review 7 months 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

#7 Updated by Gerrit Code Review 7 months 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

#8 Updated by Gerrit Code Review 7 months 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

#9 Updated by Gerrit Code Review 7 months 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

#10 Updated by Anonymous 7 months ago

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

#11 Updated by Gerrit Code Review 7 months 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

#12 Updated by Anonymous 7 months ago

  • Status changed from Under Review to Resolved

#13 Updated by Benni Mack 19 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF