Bug #60399

rte_transform "db" is not applied to RTE-fields defined via "foreign_types" / palettes

Added by Robert Heinig over 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-07-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Scenario:
I needed an RTE-field for sys_file_reference, so i created one the usual way (defaultExtras, softref ...).
Then i created a custom palette for sys_file_reference and added the fields i needed to it. This palette is used via ExtensionManagementUtility::getFileFieldTCAConfig() and "foreign_types" in a tt_content FAL-relation field.

Problem:
Visually there are no problems while editing the FAL elements within the tt_content elements. The text added to the RTE field is visible in frontend, but the rte_transform stuff with direction "db" was never applied to the RTE field before saving the data to DB - which leads e.g. to the very messy problem, that all links created with the link wizard will be stored as "a" elements with absolute URLs and not as internal "link" elements.

Way to a solution:
To hotfix this i found out that BackendUtility::getTCAtypes() used in
DataHandler->fillInFieldArray() does not return useful field information. It returns the showitem definition of the original "types" array of the sys_file_reference TCA, which contains no fields at all.
My hotfix just checks "$incomingFieldArrayKeys" in DataHandler->fillInFieldArray() for "_TRANSFORM_"-fields and adds the required field definition to "$types_fieldConfig" if it´s missing there.
For a cleaner solution the "foreign_types" have to be considered and there fields extracted - but i was not able to spot logic that does s.th. like this.


Files

backendutility.patch (1013 Bytes) backendutility.patch Patch for TYPO3 6.2 LTS Philipp Kitzberger, 2016-05-24 18:30

Related issues

Related to TYPO3 Core - Bug #70837: TCA rte configuration in palettesClosed2015-10-19

Actions
Related to TYPO3 Core - Bug #76745: TCA: defaultExtras configuration is ignored when RTE is placed inside a paletteClosedChristian Kuhn2016-06-23

Actions
#1

Updated by Christian Weiske almost 6 years ago

This bug was observed in 2013 already; see the forum entry: http://forum.typo3.org/index.php/t/198527/

The problem happens on any TCA RTE field that is inside a palette.

The bug seems to be in typo3/sysext/core/Classes/DataHandling/DataHandler.php#fillInFieldArray

#2

Updated by Romain Seignez over 5 years ago

Hello,
I had the same problem. I fixed it by adding: 'defaultExtras' => 'richtext[]:rte_transform[mode=ts_links]' to the field TCA config.

You must declare a mode to the "rte_transform" array. The funny thing is you can ask the ts_css mode, the ts_links work also...

#3

Updated by Philipp Kitzberger over 4 years ago

We ran into the same bug and were able to create a patch that fixes this issue. Thanks to Robert for pre-debugging ;-)

The patch works for our scenario but needs further testing and possibly refactoring.

Any chance this might still be included into the 6 and 7 LTS?

#4

Updated by Gerrit Code Review over 4 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/49201

#5

Updated by Gerrit Code Review over 4 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/49201

#6

Updated by Gerrit Code Review over 4 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/49201

#7

Updated by Gerrit Code Review over 4 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/49201

#8

Updated by Gerrit Code Review over 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49201

#9

Updated by Gerrit Code Review over 4 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49201

#10

Updated by Gerrit Code Review over 4 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49201

#11

Updated by Gerrit Code Review over 4 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49201

#12

Updated by Gerrit Code Review about 4 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49201

#13

Updated by Gerrit Code Review about 4 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49201

#14

Updated by Gerrit Code Review about 4 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49201

#15

Updated by Gerrit Code Review about 4 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49201

#16

Updated by Gerrit Code Review about 4 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50465

#17

Updated by Johannes Schlier about 4 years ago

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

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF