Project

General

Profile

Actions

Bug #106193

open

JavaScript table wizard in TYPO3 table content element breaks cell values

Added by Peter Kraume 26 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2025-02-18
Due date:
% Done:

0%

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

Description

In the content element "table" the JavaScript table wizard has two issues:

  1. Changes to table_delimiter and table_enclosure are not recognized immediately and taken into account on next save of the content element
  2. Using the delimiter also in a cell value gets the cell value displayed in two cells instead of one after next save

How to reproduce # 1:

  • Create a table content element
  • Default value for table_delimiter is "Pipe" and table_enclosure is "none"
  • Set table_delimiter to Comma and table_enclosure to "Double quotes"
  • Enter foo,bar into a cell
  • Save the content element

Result:

  • foo and bar are displayed in different cells
  • In the database the field bodytext is filled with foo,bar

Expected behaviour:

  • The Wizard shows only one cell with foo,bar
  • In the database the value is stored with "foo,bar"

Next step:

  • Change foo to foo2
  • Save the content element
  • The bodytext DB field is now correctly filled with "foo2","bar"

How to reproduce # 2:

  • Create a table content element
  • Set table_delimiter to Comma and table_enclosure to "Double quotes"
  • Save the element without entering data into any cell!
  • After save, enter foo,bar into one cell and save

Result:

  • foo and bar are displayed in separate cells
  • bodytext field in database is saved with foo,bar

Expected behaviour:

  • The Wizard shows only one cell with foo,bar
  • In the database the value is stored with "foo,bar"

Next step:

  • Change the value of one cell and save
  • Now bodytext is correctly saved with "foo2","bar"

Further observations:

  • The frontend rendering is correct for what is stored in the bodytext database field
  • If you only fill bodytext accordingly, e.g. by making direct changes in the database, the frontend output also functions correctly
  • The data in the database only breaks when you use the wizard and save the content element

I assume that # 2 can be fixed within writeTableSyntaxToTextarea() in Build/Sources/TypeScript/backend/form-engine/element/table-wizard-element.ts
For # 1 I have no idea so far.

Unfortunately I'm not good in JavaScript to provide a patch.

No data to display

Actions

Also available in: Atom PDF