吃饭 means have meal including, dinner/breakfast/lunch.
我喜欢在食堂吃饭: means I like to have meal in canteen much more than in other place.
我在食堂喜欢吃饭: means In canteen, I like to have meal much more than to do other things.
Beacause, canteen is mainly for having meal, so this sentence means nothing.