Issue #2274593 by setvik: Fixed Commons Media doesn't check for the existence of text formats or CKEditor profiles before attempting to alter them.