How did you apply your customisation? Does the Surf extension module have some evaluator to determine when it should be applied? Did you apply the Surf extension module to both regular Share pages as well as Aikau-based pages? Which version of Aikau are you using?
We are upgrading the Alfresco from 5.0.d to 5.2 201704 and for a while, we will use an old solution and configure the legacyMode. I'm sure there a lot of configs missing and I have to learn and check everything.