Bug #89729

Exception when adding LinkButtons to a SplitButton

Added by Johannes Kasberger 11 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2019-11-21
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The addItem method of the SplitButton class expects items of the type AbstractButton. In the render method it calls getName and getValue that are only defined for InputButtons but not LinkButtons resulting in an exception.

I don't see a reason why LinkButtons should not be supported for SplitButtons so I'd suggest that the fix is to add the rendering code for LinkButtons (or simply use the render method of the children).

Associated revisions

Revision 9b0beb70 (diff)
Added by Markus Klein 9 months ago

[BUGFIX] Add more safety checks when dealing with buttons in the BE

This patch adds more sanity checks to the SplitButton when rendering
its items. Specifically the existence of getters is checked if those
are not part of the AbstractButton already.

Resolves: #89729
Releases: master, 9.5
Change-Id: I654238e1c9d606596348119374ac283dda1c1713
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62360
Tested-by: TYPO3com <>
Tested-by: Johannes Kasberger <>
Tested-by: Susanne Moog <>
Reviewed-by: Johannes Kasberger <>
Reviewed-by: Susanne Moog <>

Revision 56956135 (diff)
Added by Markus Klein 9 months ago

[BUGFIX] Add more safety checks when dealing with buttons in the BE

This patch adds more sanity checks to the SplitButton when rendering
its items. Specifically the existence of getters is checked if those
are not part of the AbstractButton already.

Resolves: #89729
Releases: master, 9.5
Change-Id: I654238e1c9d606596348119374ac283dda1c1713
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62979
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Reviewed-by: Susanne Moog <>

History

#1 Updated by Markus Klein 11 months ago

  • TYPO3 Version changed from 10 to 8

#2 Updated by Gerrit Code Review 11 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62360

#3 Updated by Gerrit Code Review 9 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62979

#4 Updated by Markus Klein 9 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#5 Updated by Benni Mack 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF