Issue Bug Closed

#59938Empty class selector crashes Update image dialog box

Francois Suter 06/27/14, 15:36 updated 10/02/18, 11:54

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.

Reviews 2