I feel like "ask them what's wrong, and acknowledge their feelings" is advice that works well for adults, too. You don't want to be told to be happy when you're crying, really.
The asking why they are crying is really good. You should never try to distract them from what is making them cry and instead talk to them about and acknowledge it is sad and then try to come up with solutions to the problem together.