Project

General

Profile

Actions

Bug #70223

closed

Story #69617: FormEngine bugs

TCA defaultExtras not working for RTE config

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

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2015-09-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
TCA, RTE
Complexity:
Is Regression:
No
Sprint Focus:
Remote Sprint

Description

When creating a RTE textfield in the TCA in TYPO3 7.5, the use of "defaultExtras" to define some RTE buttons does not work. The RTE configuration is not changed at all.

Sample TCA:

[...]
'teaser' => array(
    'exclude' => 1,
    'label' => 'LLL:EXT:compositions/Resources/Private/Language/locallang_db.xlf:tx_compositions_domain_model_compositions.teaser',
    'config' => array(
        'type' => 'text',
        'cols' => 40,
        'rows' => 5,
        'eval' => 'trim',
        'wizards' => array(
            'RTE' => array(
                'icon' => 'wizard_rte2.gif',
                'notNewRecords' => 1,
                'RTEonly' => 1,
                'module' => array(
                    'name' => 'wizard_rich_text_editor',
                    'urlParameters' => array(
                        'mode' => 'wizard',
                        'act' => 'wizard_rte.php'
                    )
                ),
                'title' => 'LLL:EXT:cms/locallang_ttc.xlf:bodytext.W.RTE',
                'type' => 'script'
            )
        )
    ),
    'defaultExtras' => 'richtext[strong,emphasis,underline,cut,copy,paste]]',
[...]
),

Changing the RTE settings from Typical to Demo and back won't change anything.
It used to work in TYPO3 4.5 and TYPO3 6.2.

The wizard implementation respects the breaking changes.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #66803: RTE defaultExtras doesn’t work in IRRE mode Closed2015-05-05

Actions
Actions #1

Updated by Christian Kuhn over 8 years ago

  • Sprint Focus set to Stabilization Sprint
Actions #2

Updated by Gone With the Wind over 8 years ago

The essential TCA of table "compositions", created with extension_builder and manually corrected according to the 7.3 breaking changes standards:
https://wiki.typo3.org/TYPO3.CMS/Releases/7.3/Deprecation#Simplified_types_showitem_configuration_using_columnsOverrides

RTE-Transformation OVerview:
https://docs.typo3.org/typo3cms/CoreApiReference/Rte/Transformations/Overview/Index.html

<?php
return array(
    'ctrl' => array(
        'title' => 'LLL:EXT:compositions/Resources/Private/Language/locallang_db.xlf:tx_compositions_domain_model_compositions',
        'label' => 'title',
        [..]
        'searchFields' => 'title,subtitle1,subtitle2,instrumentation,create_date_start,create_date_end,premiere_date,teaser,link_to_pdf,link_to_score,composers,categories,performers,',
        'iconfile' => 'Ext:compositions/Resources/Public/Icons/tx_compositions_domain_model_compositions.gif'
    ),
    'interface' => array(
        'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, subtitle1, subtitle2, instrumentation, create_date_start, create_date_end, premiere_date, teaser, link_to_pdf, link_to_score, composers, categories, performers',
    ),
    'types' => array(
        '1' => array(
            'showitem' => '--palette--;;1, title, --palette--;;2, composers, author, duration, --palette--;;3, categories, instrumentation, teaser, link_to_pdf, link_to_score, performers, premiere_date, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime',
            // this goes along with the TCA breaking changes from the 7.3 milestone - but unfortunately has no effect  
            'columnsOverride' => array(
                'teaser' => array(
                    'defaultExtras' => 'richtext[]:rte_transform[mode=ts_css]',
                ),
            ),
        ),
    ),
    'palettes' => array(
        '1' => array('showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden'),
        '2' => array('showitem' => 'subtitle1, subtitle2'),
        '3' => array('showitem' => 'create_date_start, create_date_end'),
    ),
    'columns' => array(
        [...]
        'teaser' => array(
            'exclude' => 1,
            'label' => 'LLL:EXT:compositions/Resources/Private/Language/locallang_db.xlf:tx_compositions_domain_model_compositions.teaser',
            'config' => array(
                'type' => 'text',
                'cols' => 40,
                'rows' => 5,
                'eval' => 'trim',
                'wizards' => array(
                    'RTE' => array(
                        'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_rte.gif',
                        'notNewRecords' => 1,
                        'RTEonly' => 1,
                        'module' => array(
                            'name' => 'wizard_rich_text_editor',
                            'urlParameters' => array(
                                'mode' => 'wizard',
                                'act' => 'wizard_rte.php'
                            )
                        ),
                        'title' => 'LLL:EXT:cms/locallang_ttc.xlf:bodytext.W.RTE',
                        'type' => 'script'
                    )
                )
            ),
            // implementing 'defaultExtras' here at least causes the RTE to get rendered, but only in site-wide configuration (mentioned here for the sake of completeness)
            //'defaultExtras' => 'richtext[strong,emphasis,underline,cut,copy,paste]',
        ),
    ),
);
Actions #3

Updated by Christian Kuhn over 8 years ago

  • Parent task set to #69617
Actions #4

Updated by Markus Klein over 8 years ago

  • Sprint Focus changed from Stabilization Sprint to Remote Sprint
Actions #5

Updated by Benni Mack over 8 years ago

  • Category changed from TypoScript to FormEngine aka TCEforms
Actions #6

Updated by Morton Jonuschat over 8 years ago

  • Status changed from New to Closed

Hi!

Please be aware that the default richtext configuration from the PageTS will be applied before the defaultExtras richtext configuration. If you only have a default RTE configuration that enables a lot of functionality you are not able to reduce RTE interface just by the additional options within defaultExtras. As the documentation states defaultExtras "Enables the RTE for the field and allows you to set which toolbar buttons must be shown on top of the existing configuration."

In the case that you want to enable a limited set of buttons for the RTE - you can do this on multiple levels using the RTE object in PageTS using a syntax like this: RTE.config.[tablename].[field].types.[type]

If you configure the RTE to only show bold, italic and underline for the table 'aTable' and the field 'aField' you can later add more buttons to this configuration based on the defaultExtras.

As a very basic example this PageTS:

RTE.default {
    showButtons (
        bold, italic
    )
}

combined with the following defaultExtras

richtext[underline|link]:rte_transform[mode=ts_css]

Results in the RTE for that field showing the buttons for bold, italic, underline and links.

If you think it's the wrong decision to close this issue please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions #7

Updated by Christian Kuhn over 8 years ago

  • % Done changed from 0 to 100
Actions #8

Updated by Rafal Brzeski over 8 years ago

hello, there is also related issue #24075, #66803
can somebody take a look into this?

Actions #9

Updated by Simon Schaufelberger almost 7 years ago

  • Related to Bug #66803: RTE defaultExtras doesn’t work in IRRE mode added
Actions

Also available in: Atom PDF