Review 12.4 Merged

87954[BUGFIX] Fix various issues in conjunction with `f:be.tableList`

Andreas Kienast CR +2 V +2 Normal +17 −46 updated 02/11/25, 12:54

Commit message

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 to return the string "Cancel".

When `<f:be.tableList>` is used In an extbase-based backend module
like EXT:belog/beuser/extensionmanager/indexed_search, that `TYPO3.lang`
fallback index is not available, 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 `DatabaseRecordList::makeControl()` method now also
utilizes `data-button-close-text` in addition to `data-button-ok-text`,
so that the reliance on `TYPO3.lang` is no longer required.

All other methods in the TYPO3 Core which set `data-button-ok-text`
always also populate that `button-close-text` data attribute,
thus streamlining this behavior.

Additionally, multi-record deletion was completely dysfunctional as its
handling was tightly coupled to the Record List module. It turned out
this is not necessary as there's already a dedicated module handling
deletion, based on `AjaxDataHandler`. Said module is now used in the
regular record list, as in the view helper, fixing the broken handling
in the latter one. This supersedes the handling in
`@typo3/backend/recordlist`, which has been removed.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
  • Verified V +2 Done
    • Andreas Kienast +2
    • core-ci +1 CI

Issues 1

Files 7

Review log 46

  1. Andreas Kienast uploaded patch set 1 01/31/25, 10:45

  2. core-ci voted on patch set 1 V +1 01/31/25, 10:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73254

  3. Andreas Kienast uploaded patch set 2 V +1 01/31/25, 12:04

  4. core-ci voted on patch set 2 V +1 01/31/25, 12:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73264

  5. Andreas Kienast voted on patch set 2 CR +2 V +2 02/11/25, 12:54

  6. Andreas Kienast merged patch set 3 02/11/25, 12:54