problem about view module in drupal 7
As @googletorp commented, the argument in the url have to keep a certain order if not Views won't know which kind it is. The recommended method for this is allowing a "wildcard" by providing an exception, in views you can configure this in the contextual filter options:

Then you simply put all instead of the year when not it's not available:
2- the category id alone : http://mydomain.com/events/all/4