#110050Cannot disable buttons in DocHeader
Description
*Description*
In a custom backend module I add previous and next buttons to the DocHeader using LinkButton. To disable the buttons when there is no previous or next item, I use the setDisabled() method.
Since the release 13.4.20 this no longer works. Buttons that are explicitly disabled via setDisabled() are enabled again.
Steps to reproduce- Create a custom backend module
- Create a LinkButton and call setDisabled(true) on the button
- Add the button to the ButtonBar in the DocHeader
- Open the module in the backend
*Expected behavior*
Buttons that are disabled via setDisabled() should remain disabled.
*Actual behavior*
Buttons are rendered as enabled even though setDisabled(true) was called.
*Additional context*
I think this behavior is caused by the following change, where buttons are first disabled and later re-enabled in Build/Sources/TypeScript/backend/form-engine.ts:
https://review.typo3.org/c/Packages/TYPO3.CMS/+/91190
Reviews 2
Related issues 1
History 59
-
Garvin Hicking changed category Is Regression 1 <span data-processor="relativetime" data-value="2026-06-11T14:47:23+00:00" > 06/11/26, 14:47 </span>
-
Garvin Hicking changed Related to #107681 <span data-processor="relativetime" data-value="2026-06-11T14:47:36+00:00" > 06/11/26, 14:47 </span>
-
Garvin Hicking commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2026-06-11T21:40:22+00:00" > 06/11/26, 21:40 </span> -
Feline Fabijan commented <span data-processor="relativetime" data-value="2026-06-15T11:28:30+00:00" > 06/15/26, 11:28 </span>
Garvin Hicking wrote in #note-3:
> While discussing this with Oli, he wondered: Why draw an actual disabled button at all? Shouldn’t you probably leave out the buttons at all in that case?
>
> Maybe with a use case in mind we can see how to address it, as the formengine disabling is really a bit specific to formengine context…In our custom backend module we list all images from the fileadmin that are missing alt text. Using the previous and next buttons you can navigate through the images and skip any you don’t want to add alt text to. When viewing the first image in a folder the previous button should be disabled since there is no previous image. The same applies to the next button when you’re viewing the last image. We also chose not to remove the buttons entirely because that would cause the button bar to shift.
-
Gerrit Code Review pushed patch set 1 for main to change 95836 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2026-09-15T06:31:48+00:00" > 09/15/26, 06:31 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95836 <span data-processor="relativetime" data-value="2026-09-15T07:15:04+00:00" > 09/15/26, 07:15 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 95836 <span data-processor="relativetime" data-value="2026-09-16T05:47:46+00:00" > 09/16/26, 05:47 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95871 <span data-processor="relativetime" data-value="2026-09-16T10:14:35+00:00" > 09/16/26, 10:14 </span>
-
Oliver Bartsch commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-16T10:20:09+00:00" > 09/16/26, 10:20 </span>Applied in changeset commit:fdafe89cc4b9b83c69c13945c0efccc69e1d107a.
While discussing this with Oli, he wondered: Why draw an actual disabled button at all? Shouldn’t you probably leave out the buttons at all in that case?
Maybe with a use case in mind we can see how to address it, as the formengine disabling is really a bit specific to formengine context…