so maybe your templates or some plugin does something with page's header , so that may be the reason photo-gallery did't start as usual without all this manual changes. You use some Gantry based template, try to ask template provider for help. You need to ask them is there anything that can remove script/style references from pages header in their products.