Bug #59938
closedEmpty class selector crashes Update image dialog box
100%
Description
If the class selector is displayed in the "Update image" dialog box, but that class selector is empty (because no classes are defined), the related JavaScript will crash when trying to determine the selected class. This then prevents the plugin.close()
command that comes later to be executed. In turn this causes the dialog to be reloaded instead of being closed eventually leading to an error about the form token being invalid (a symptom which is quite hard to relate to the original cause ;-) ).
A simple test on the number of options in the selector prevents this error.
Updated by Francois Suter over 10 years ago
How to reproduce:
- make sure that the class selector is enabled for images in the RTE
- select an image and choose "Modify image"
- no need to actually change anything, just close on the "Update" button
- the window does not close and display the security token error.
Updated by Gerrit Code Review over 10 years ago
- Status changed from Accepted 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/31169
Updated by Gerrit Code Review over 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31350
Updated by Francois Suter over 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c1ae3d1e2d3b7917df18939095991c083a7a67d4.