Can't get partnerServerUrl in sandbox

Hi,

I can’t get the partner url in my sandbox.

I’ve tried merge syntax:

'&serverUrl={{$Api.Partner_Server_Url}}'```and populates an empty string and Javascript : 
'&serverUrl='+sforce.connection.partnerServerUrl``` and populates "undefined"

I'm using skuid for salesforce 11.0.5
In production I have the same version and it works.

To confirm, you have the same version of Skuid in both Sandbox and Production, and you are using the same Skuid Page (in Visualforce I’m assuming) in both environments, but in Sandbox, sforce.connection.partnerServerUrl || {{$Api.Partner_Server_Url}} is showing up as undefined ?

Yes, That’s the case.

the weird thing is that if I put sforce.connection.partnerServerUrl in the chrome console it shows the url.

The code I’m using is:

var params = arguments[0];
var url = '<a target="" rel="" href="https://composer.congamerge.com" alt="" title="Link httpscomposercongamergecom" name="" value="" type="">https://composer.congamerge.com</a>'
    + '?sessionId={{$Api.Session_Id}}'
//  + '&amp;serverUrl={{$Api.Partner_Server_Url}}'
    + '&amp;serverUrl='+sforce.connection.partnerServerUrl 
    + '&amp;id={{Id}}'
    + '&amp;ReportVar={{Id}}'
    + '&amp;QVar0Id={{$Label.OSIOrderContactID}}?pv0={{Id}}'
    + '&amp;QVar1Id={{$Label.OSIOrderContacsEmail}}?pv0={{Id}}'
    + '&amp;QueryId=[Message]{{$Label.QueryLastUpdate}}?pv0={{Id}},'
    + '[FirstOrderContact]{{$Label.FirstOrderContact}}?pv0={{Id}},'
    + '[Site]{{$Label.Site}}?pv0={{{Opportunity__r.Id}}},'
    + '[Contacts]{{$Label.Conga_Query_OSI_OrderContacts_mail_name_role}}?pv0={{Id}},'
    + '[Owner]{{$Label.UserQuery}}?pv0={{{Owner__c}}}'
    + '&amp;EmailToId={QVar0}'
    + '&amp;EmailAdditionalTo={QVar1}'
    + '&amp;EmailCC={{$Model.User.data.0.Email}}'
    + '&amp;CongaEmailTemplateID={{$Label.Conga_Email_Template_OrderUpdateV3}}'
    + '&amp;EmailRelatedToId={{Id}}'
    + '&amp;LG4=2'
    + '&amp;AC0=1'
    + '&amp;DS7=2';
var merges = skuid.$('<div>').html(params.model.mergeRow(params.row,url));
alert (merges.text());

All the merges are doing it correctly except for the partner url.

Any idea?