Bug #105989
closedExtbase-based backend modules for f:be.tableList have no localized "Cancel" button
100%
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 onlydata-button-ok-text
but also data-button-close-text
so that the reliance onTYPO3.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.