Project

General

Profile

Actions

Bug #71624

closed

Story #69617: FormEngine bugs

Multiple RTEs behave incorrect, especially textstyle

Added by Gone With the Wind over 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Start date:
2015-11-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

TYPO3 7.6, Mac OS X 10.11.1, Chrome 47.0.2526.58 beta (64-bit), php 5.6.10, no opcode, no apc etc

Description:
Adding a new RTE text field (or re-defining an exisiting one) does not render the textstyle correctly. Instead, selecting some text in order to assign some styling to it, activates the textstyle box of the bodytext RTE, but with styles that are defined on the new field (via PageTS).
The behavior might need verification from other users.

Steps to reproduce:

1. In .../Overrides/tt_content.php redefine the header field to get an RTE assigned:

$GLOBALS['TCA']['tt_content']['columns']['header'] = array(
    'config' => array(
        'type' => 'text',
        'cols' => '80',
        'rows' => '3',
        'wizards' => array(
            'RTE' => array(
                'notNewRecords' => 1,
                'RTEonly' => 1,
                'type' => 'script',
                'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext.W.RTE',
                'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_rte.gif',
                'module' => array(
                    'name' => 'wizard_rte'
                )
            ),
            'table' => array(
                'notNewRecords' => 1,
                'enableByTypeConfig' => 1,
                'type' => 'script',
                'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext.W.table',
                'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_rte.gif',
                'module' => array(
                    'name' => 'wizard_table'
                ),
                'params' => array(
                    'xmlOutput' => 0
                )
            )
        ),
        // RTE does this automatically on all fields defined as text, but uses its own Overrides/tt_content.php
        // TODO: find out if the RTE's Overrides are parsed before this extension; if so, the following line can be removed
        //'softref' => 'rtehtmlarea_images,typolink_tag'
    ),
    // Important: this line only *ADDS* to the already existing configuration, so check any pageTsConfig
    'defaultExtras' => 'richtext[]'
);
unset($GLOBALS['TCA']['tt_content']['columns']['header']['config']['max']);
unset($GLOBALS['TCA']['tt_content']['columns']['header']['config']['size']);

2. Add a pageTsConfig with this TypoScript:

RTE.default {
  contentCSS = EXT:sitesetup/Resources/Public/Css/rte.css
  proc.allowedClasses := addToList(color-header--secondary)
  buttons.textstyle.showTagFreeClasses = 0
  buttons.textstyle.tags.span.allowedClasses = text-muted, text-warning, text-sucess [...] # different styles than in the header field RTE
  buttons.formatblock.removeItems = h1, h2, h3, pre, address, article, [...]
}

RTE.config.tt_content.header {
  toolbarOrder (
    formatblock, textstyle [...]
  )
  showButtons = formatblock, textstyle [...]
  buttons.formatblock.removeItems = h5, h6, pre, address,[...]
  buttons.formatblock.addItems = h2,h3,h4
  buttons.textstyle.showTagFreeClasses = 1
  buttons.textstyle.tags.span.allowedClasses = color-header--secondary # different styles than in the bodytext field RTE
}

3. Add a RTE css file:

span.color-header--secondary { color: #df9700; }
.color-header--secondary { color: #df9700; }

4. Write some text into the redefined header field, assign it a h1, select a partial text sequence of that header and try to assign it the textstyle "color-header--secondary".

Expected Behavior:
The textstyle dropdown of the header field RTE opens showing a list with one style, the color-header--secondary style. This style can be assign to the selected text section generating a <span class="color-header--secondary"> tag in the source code.

What really happens:
The textstyle box of the bodytext RTE is activated, showing -strangly enough - those style{s) that are defined in the header field RTE section. (A check in the bodytext shows that the classes appearing in the textstyle dropdown button are indeed those defined on the RTE.default-section...)

Added some images illustrating the behavior. This actually already used to work, so it seems to be a regression?

It wold be great, if someone could give feedback on whether (s)he experiences the same problem! Thank you!


Files

RTE_01.png (99 KB) RTE_01.png Gone With the Wind, 2015-11-17 13:10
RTE_02.png (112 KB) RTE_02.png Gone With the Wind, 2015-11-17 13:10
RTE_03.png (113 KB) RTE_03.png Gone With the Wind, 2015-11-17 13:10

Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #68392: Multiple RTE in element blocktyle dropdown filled only onceClosed2015-07-20

Actions
Has duplicate TYPO3 Core - Bug #71725: multiple RTEsClosed2015-11-20

Actions
Has duplicate TYPO3 Core - Bug #73134: 2 RTEs on one page each with another config don't workClosed2016-02-05

Actions
Has duplicate TYPO3 Core - Bug #73573: Styles lost for multiple RTEs in a flexformClosed2016-02-19

Actions
Actions #1

Updated by Markus Klein over 8 years ago

  • Description updated (diff)
Actions #2

Updated by Gone With the Wind over 8 years ago

RTE.config.tt_content.header {
  toolbarOrder.formatblock, textstyle [...]
}

should read:

RTE.config.tt_content.header {
  toolbarOrder (
    formatblock, textstyle [...]
  )
}

Thanks, Markus, for reformatting!

Actions #3

Updated by Markus Klein over 8 years ago

  • Description updated (diff)
Actions #4

Updated by Christian Kuhn over 8 years ago

  • Parent task set to #69617
Actions #5

Updated by Markus Klein over 8 years ago

  • Assignee deleted (Markus Klein)
Actions #6

Updated by Markus Klein over 8 years ago

  • Target version changed from 7.6.1 to Candidate for patchlevel
Actions #7

Updated by Philipp Wrann about 8 years ago

I am affected of this too, changing browsers does not change anything in my case. If you have inline children using rtes in an element, that uses rte itself you will not be able to use your configured rte classes in both instances. You have to collapse the inline child - edit the parent record and then edit the inline record separat.

Actions #8

Updated by Andreas Kienast about 8 years ago

  • Status changed from New to Needs Feedback

Can you please check whether this bug is fixed with https://review.typo3.org/#/c/46982/ ?

Actions #9

Updated by Stephan Brun about 8 years ago

It work in my case with the newest rtehtmlarea from TYPO3 Github 7.6 branch. Can not say if it was fixed by https://review.typo3.org/#/c/46982/, but it work.

Actions #10

Updated by Christian Kuhn about 8 years ago

  • Status changed from Needs Feedback to Closed

i think this is resolved. i'll close this issue for now.

Actions #11

Updated by Christian Kuhn about 8 years ago

  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF