You misunderstood my meaning. There is an id in the URL but it is an Id for an object that is not the Contact.
I’ve seen this before with “c__SocialProfileViewer”. The VF works when an Id is for a record in the Account, Contact or Lead object.
So, if the page the user is on has an URL id parameter, it must be an id of a record for the Account, Contact or Lead object.
I suspect the page Shaik is attempting to use this “c__SocialProfileViewer” VF page is not for any of these objects, but for some other object. If it’s for the same org that I work on as well, then it’s the “Elite_Agent__c” object.
I suspect that once the VF page is loaded, the JS code looks in the current windows URL for the things it’s looking for. ie. the URL parameter for the Elite Agent Detail page vs the Id from the Template Component, and thereby breaking the code since the it’s not a Account, Contact or Lead record.
Screenshots of the errors.