external_import icon indicating copy to clipboard operation
external_import copied to clipboard

Review rteEnabled flag

Open fsuter opened this issue 3 years ago • 3 comments

It is unclear what the rteEnabled flag actually does. This needs to be investigated and - at the very least - better documented.

fsuter avatar Mar 21 '22 16:03 fsuter

rteEnabled = false puts the data nearly completely untransformed into the database - nearly: if there are Windows-Newlines (\r\n), they (might?) get converted to Unix-Newlines (\n)

rteEnabled = true seems (!) to use RTE transformations - how to configure them: unclear.

The "default" line break for RTE Stuff after processing is \r\n (CRLF) (https://api.typo3.org/master/class_t_y_p_o3_1_1_c_m_s_1_1_core_1_1_html_1_1_rte_html_parser.html streamlineLineBreaksAfterProcessing()); while processing just \n or LF, see streamlineLineBreaksForProcessing()

Right now I'm trying to understand the way from file to db in external_import - with the hope to find all involved parts and methods.

ineswillenbrock avatar Mar 21 '22 19:03 ineswillenbrock

Edit of the previous one: rteEnabled works just fine -- if you don't use the bootstrap_package.

Longer explanation: the default RTE brings its own configuration, that is overwritten if you use the bootstrap_package. This, the bootstrap_package, configuration seems to have some things that result in the above behaviour. A possible workaround is the following: Define the rte configuration in the import configuration like so:

$GLOBALS['TCA']['tx_extname']['columns']['description'] =[
  'config' => [
      'type' => 'text',
     'richtextConfiguration' => 'default_import',
   ],
];

The default_import should be a copy of a non-bootstrap-default.yaml-file.

I'm not sure, WHY this happens, which part of the configuration is responsible for this.

But: rteEnabled=true is fine edit: will check the configuration and see, if I understand the why.

ineswillenbrock avatar Apr 19 '22 20:04 ineswillenbrock

Thanks a lot for continuing to dig into that topic! I feel supported and grateful for that.

fsuter avatar Apr 26 '22 06:04 fsuter