I am running into a strange problem that SP.Ribbon.js is not getting loaded.
Our custom master page could be a possible problem, but it works in 3 out of 5 environments, so I'm thinking it has more to do with configuration or other environmental problems. But I have no idea where to look, and no idea where is the corresponding code for those core SP script files.
I hope the above makes sense, and any help will be much appreciated!
Update: In the broken environments, if I change the web's UIVersion to 4 (it was changed to 3), the missing js files (cui.js/sp.ribbon.js) will be loaded. This would not be the optimal solution however, as it breaks a lot of the html and css layouts.
Plus, UIVersion being 3 does not seem to cause those js files to be missing in other environments, only if I can figure out why...