Project

General

Profile

Actions

Bug #105989

closed

Extbase-based backend modules for f:be.tableList have no localized "Cancel" button

Added by Garvin Hicking about 2 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Should have
Category:
Backend User Interface
Target version:
Start date:
2025-01-25
Due date:
% Done:

100%

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

Description

The Fluid ViewHelper f:be.tableList uses the sysext/backend/Classes/RecordList/DatabaseRecordList.php
method makeControl to render a "Delete" button inside record lists.

Clicking on that link uses Build/Sources/TypeScript/backend/ajax-data-handler.ts which localizes
the modal popup contents with either the strings of anchorElement.dataset.buttonCloseText
or TYPO3.lang['button.cancel'] as a fallback.

In the extbase-based backend module, that TYPO3.lang fallback index is not available/set,
and returns a JavaScript error:

VM7262 ajax-data-handler.js:13 Uncaught TypeError: Cannot read properties of undefined (reading 'button.cancel')
    at HTMLButtonElement.<anonymous> (VM7262 ajax-data-handler.js:13:1730)
    at HTMLDocument.<anonymous> (VM7215 regular-event.js:13:433)

To fix this, the makeControl() method now also utilizes not only
data-button-ok-text but also data-button-close-text so that the reliance on
TYPO3.lang no longer is required.

All other methods in the TYPO3 core that set data-button-ok-text always
also populate that data attribute, so this patch streamlines this
bevhaviour.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #106301: <f:be.tableList> cannot mass delete selected entriesClosed2025-03-04

Actions
Actions

Also available in: Atom PDF