#103979Bug in cms-rte-ckeditor: "small" element not usable in Composer-mode
Description
I found an error in cms-rte-ckeditor. In Configuration/RTE/Default.yaml and Configuration/RTE/Full.yaml you can find the following lines:
style:
definitions:
- { name: "Lead", element: "p", classes: ['lead'] }
- { name: "Small", element: "small", classes: [] }
The -Tag does not function. But it will with the following line:
- { name: "Small", element: "small", classes: [''] }
This will result in a -Tag with an empty class, but it does function at least.
Reviews 2
History 717
-
Garvin Hicking commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2024-06-05T11:53:46+00:00" > 06/05/24, 11:53 </span> -
Harald Witt commented <span data-processor="relativetime" data-value="2024-06-05T13:25:53+00:00" > 06/05/24, 13:25 </span>
Garvin Hicking wrote in #note-1:
> In my installation (Firefox, Chromium, Safari) I can use “small” in the RTE, no matter if I:
>
> * use", classes: []"
> * use", classes: ['']"
> * drop", classes: []"alltogether
>
> In all three cases though, a<small class="">is emitted for me…
>
> Can you provide some details, is maybe some other extension also changing YAML RTE configuration, or maybe affect it via JS?Hi Garvin,
I’m using Windows 10 with Chrome 125.0.6422.142. I also tried Firefox 124.0.2 and MS-Edge 125.0.2535.85. All the latest version.
But the problem is the same in all 3 browsers:- use
", classes: []"does simply not function - use
", classes: ['']"functions properly - drop
", classes: []"alltogether makes, that the style-dropdown gives up completely (no dropdown possible)
I have nothing in Backend what would influence the RTE YAML config. And also no additional JavaScript.
And because I know that it smells like a JS inteference i’ve tried another Typo3 instance …
I’ts a Typo3 12.4.11 instance, I’ve installed from scratch a few months before. And inside is beside the usual cms-extensions only one lonely EXT. And the latter only contains some TCA definitions – nothing else.
But the problem is the same. Seems to be OS / Browser dependent.Greetings
Harald
BTW: You can also contact me in Typo3 Slack, e. g. https://app.slack.com/client/T024TUMLZ/C03AM9R17 - use
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2024-06-05T15:00:01+00:00" > 06/05/24, 15:00 </span>
I’ll contact you and check if I could maybe verify this in your installation to see if it’s browser or installation-related.
(Recent firefox should be 126.0.1 not 124.0.1 though)
-
Garvin Hicking commented and changed subject
Bug in cms-rte-ckeditorBug in cms-rte-ckeditor: "small" element not usable in Composer-mode statusNeeds FeedbackAccepted <span data-processor="relativetime" data-value="2024-06-06T12:36:43+00:00" > 06/06/24, 12:36 </span>Color me surprised:
- It works in Legacy mode for me in both main + v12.4 (i.e. GIT checkout)
- It does NOT work in TYPO3 v12.4 composer mode with a completely vanilla installation (no extensions at all)
Steps to reproduce:
- Create directory like “t3-vanilla”
- Have a simple composer.json [1]
- Create a ddev project (“ddev config” > pick some name, docroot “htdocs”, project type “typo3”
- ddev composer install
- ddev restart
- ddev launch typo3/install.php -> perform installation
- open backend
- Create an empty dummy page
- Create a content element “Regular text”
- In the bodytext enter any random text, select the text, choose dropdown “Styles” from CKeditor instance, pick “small”
- No HTML layout will be applied
If you edit the file `./vendor/typo3/cms-rte-ckeditor/Configuration/RTE/Default.yaml` and change:
- { name: "Small", element: "small", classes: [] }to:
- { name: "Small", element: "small", classes: [''] }it will indeed work when reloading the browser. Removing “, classes: []” will break the dropdown.
Since “classes: [‘’]” works in both legacy mode and composer mode, I’d argue using that to unbreak composer mode would be fair.
[1] composer.json
{ "name": "debug/t3v12-vanilly", "version": "1.0.0", "require": { "ext-mysqli": "*", "ext-pdo": "*", "ext-iconv": "*", "ext-json": "*", "ext-simplexml": "*", "ext-openssl": "*", "typo3/minimal": "^12.0", "typo3/cms-fluid-styled-content": "^12.3", "typo3/cms-info": "^12.3", "typo3/cms-recycler": "^12.3", "typo3/cms-reports": "^12.3", "typo3/cms-rte-ckeditor": "^12.3", "typo3/cms-scheduler": "^12.3", "typo3/cms-setup": "^12.3", "typo3/cms-tstemplate": "^12.3", "typo3/cms-belog": "^12.3", "typo3/cms-beuser": "^12.3", "typo3/cms-adminpanel": "^12.3", "typo3/cms-filemetadata": "^12.3", "typo3/cms-impexp": "^12.3", "typo3/cms-viewpage": "^12.3", "typo3/cms-lowlevel": "^12.3", "typo3/cms-redirects": "^12.3", "typo3/cms-seo": "^12.3", "typo3/cms-felogin": "^12.3", "typo3/cms-form": "^12.3" }, "extra": { "typo3/cms": { "cms-package-dir": "{$vendor-dir}/typo3/cms", "web-dir": "htdocs" } }, "config": { "allow-plugins": { "typo3/cms-composer-installers": true, "typo3/class-alias-loader": true } } } -
Garvin Hicking commented <span data-processor="relativetime" data-value="2024-06-11T10:07:49+00:00" > 06/11/24, 10:07 </span>
Small update. The reason it worked in my legacy install tests was because there I had the “bootstrap_package” installed which operated on the RTE configurations.
So the “classes: []” in fact seems broken everywhere. Sorry for getting off-track here and overcomplicating things with the way I tested it.
-
Gerrit Code Review pushed patch set 1 for main to change 84679 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2024-06-13T08:21:35+00:00" > 06/13/24, 08:21 </span> -
Gerrit Code Review pushed patch set 2 for main to change 84679 <span data-processor="relativetime" data-value="2024-06-13T10:05:22+00:00" > 06/13/24, 10:05 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 84679 <span data-processor="relativetime" data-value="2024-07-16T15:38:19+00:00" > 07/16/24, 15:38 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 84679 <span data-processor="relativetime" data-value="2024-07-31T08:08:32+00:00" > 07/31/24, 08:08 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 84679 <span data-processor="relativetime" data-value="2024-08-02T13:18:29+00:00" > 08/02/24, 13:18 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 84679 <span data-processor="relativetime" data-value="2024-08-22T23:05:21+00:00" > 08/22/24, 23:05 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 84679 <span data-processor="relativetime" data-value="2024-08-22T23:12:27+00:00" > 08/22/24, 23:12 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 84679 <span data-processor="relativetime" data-value="2024-08-29T07:32:36+00:00" > 08/29/24, 07:32 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 84679 <span data-processor="relativetime" data-value="2024-08-29T08:26:01+00:00" > 08/29/24, 08:26 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 85766 <span data-processor="relativetime" data-value="2024-08-29T09:57:18+00:00" > 08/29/24, 09:57 </span>
-
Garvin Hicking commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2024-08-29T10:00:10+00:00" > 08/29/24, 10:00 </span>Applied in changeset commit:1ab46cb3aed8e40c09eb19f7a11720567589c7b1.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2024-10-15T09:30:54+00:00" > 10/15/24, 09:30 </span>
In my installation (Firefox, Chromium, Safari) I can use “small” in the RTE, no matter if I:
", classes: []"", classes: ['']"", classes: []"alltogetherIn all three cases though, a
<small class="">is emitted for me…Can you provide some details, is maybe some other extension also changing YAML RTE configuration, or maybe affect it via JS?