2

I am facing this problem inside my sharepoint 2013 on-premises farms. where i have added a content search web part, then i did the following:-

1- Inside the content search web part's display template, i am using the following code to redirect to the content search webpart page, when users click on an item inside the content search web part, and they chose to edit/display the item:-

var SiteCollectionFullUrl = window.location.protocol + '//' + window.location.host + window.location.pathname;
var value = i === 1 ? String.format("<a href='{0}&source={2}' class='ms-listlink' >{1}</a>", linkURL, property,SiteCollectionFullUrl) : property;

where i am storing the current url inside var SiteCollectionFullUrl then i am building a link which contain the var SiteCollectionFullUrl inside its source parameter.

now i have implemented this inside 2 farms, and it is working well on one farm, while it is partially working on the other farm, as follow:-

  1. on the farm which is working well. i have the following inside the alternate access mapping:-
    • http://servername/ as the defualt zone.
    • https://customerA.intra as the internet zone.

now when i access the content search web part page either using http://servername/ OR https://customerA.intra the redirect will work well. Where i access the content search web part page, and i click on an item title, i will be redirected to the item display form, Then if i click on close i will redirect to the content search web part page correctly, also if i chose to edit the item i will also be redirected to the content search web part page correctly after submitting the edit form.

  1. While on other farm i have the following settings inside the alternate access mapping-

    • http://servername/ as the defualt zone (same as the other farm).
    • http://customerB.intra as the intranet zone. (while on the other farm we have https and it is set as the Internet zone)

now inside this farm if i access the content search web part page using http://servername/ the redirect will work well. but if i access the content search web part page using http://customerB.intra i will be redirected to the list default view instead of being redirected to the content search web page. so seems for a reson or another the source parameter i am passing does not have any effect if i am accessing the content search web part page using the intranet zone in the second farm... so can anyone adivce on this issue please ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.