Review main Merged

88173[BUGFIX] Prevent recycler failure when allowDelete=0 is set

Ursula Klinger CR +2 V +2 Easy +12 −12 updated 02/17/25, 09:54

Commit message

Setting the user TSconfig option `mod.recycler.allowDelete=0`
lead to the recycler's backend module showing a javascript
error that an undefined HTML DOM element (mass delete button)
cannot be removed.

The check whether the mass delete should be created in the
DOM is performed in the fluid section `multiRecordSelectionActions`
of `RecyclerModule.html`. Because of this, there is no
need to try to remove this in the DOM dynamically.

The whole conditional block is now removed, because the other
functionality it provided was to set a `display: block`
attribute on the mass delete buttons, which is also already part of
the regular DOM.

Two other checks on the existance of the DOM mass delete element
are now changed so that `TYPO3.settings.Recycler.deleteDisable` is
evaluated instead.

Review

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

Issues 1

Files 2

Review log 1520

  1. Ursula Klinger uploaded patch set 1 02/11/25, 18:28

  2. core-ci voted on patch set 1 V -1 02/11/25, 18:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74004

  3. Ursula Klinger uploaded patch set 2 V -1 02/11/25, 18:45

  4. core-ci voted on patch set 2 V +1 02/11/25, 18:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74005

  5. Garvin Hicking updated the commit message in patch set 3 V +1 02/12/25, 07:08

  6. Garvin Hicking commented on patch set 3 V +1 02/12/25, 07:08

    This patch works for me
  7. core-ci voted on patch set 3 V +1 02/12/25, 07:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74031

  8. Andreas Kienast commented on patch set 3 02/12/25, 07:14

    I'd prefer to pass the actual configuration to the Recycler module and check the configuration instead the existence of arbitrary DOM elements. The latter may mask additional, undiscovered bugs.
  9. Andreas Kienast voted on patch set 3 CR -1 02/12/25, 07:15

  10. Garvin Hicking uploaded patch set 4 CR -1 V +1 02/12/25, 08:18

  11. Garvin Hicking commented on patch set 4 02/12/25, 08:19

    Thanks Ursula for this patch. I think I got to the root of the problem; the DOM element setup was already "good" so a chunk of the JS did simply not apply. Could you check out if my reworked patch also works for you? I've updated the patch's description for details.
  12. core-ci voted on patch set 4 V +1 02/12/25, 08:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74035

  13. Garvin Hicking voted on patch set 4 CR +1 V +1 02/12/25, 08:58

  14. Andreas Kienast uploaded patch set 5 CR +1 V +1 02/14/25, 07:53

  15. Andreas Kienast commented on patch set 5 CR +1 V +1 02/14/25, 07:53

    Reply

    Done
  16. core-ci voted on patch set 5 V +1 02/14/25, 07:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74144

  17. Garvin Hicking voted on patch set 5 CR +1 V +1 02/14/25, 09:00

  18. Garvin Hicking voted on patch set 5 CR +2 02/17/25, 09:54

  19. Garvin Hicking voted on patch set 5 V +2 02/17/25, 09:54

  20. Garvin Hicking merged patch set 6 02/17/25, 09:54