-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Search: link to main project in subproject results #7880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@stsewd @ericholscher Hey, thanks for taking care of this. Would you have an estimate on when you would be able to merge and deploy this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a good fix for now, sorry for the delay here 👍
@@ -70,6 +70,11 @@ function attach_elastic_search_query_sphinx(data) { | |||
} | |||
|
|||
var link = result.path + "?highlight=" + $.urlencode(query); | |||
// If we aren't on the main domain of the subproject, link to it. | |||
// TODO: we should always redirect to the main domain instead. | |||
if (result.path.startsWith('/projects/') && !window.location.href.startsWith(result.domain)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think on .com we allow users to customize this path, so we probably need something smarter here in the future, but this should work for 99% of users for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think redirecting to the main project should fix all this, but that's a bigger change in proxito
@ramirezfranciscof this should be live by tomorrow afternoon |
Thanks a lot, guys! I confirm that this has fixed the issue for us. |
Indeed, all works great now, thanks! |
Revert #7880 since we now always redirect to the subproject domain.
Revert #7880 since we now always redirect to the subproject domain.
I'm checking for urls stating with
/projects/
only, since we don't want to go back to link to the full URL again...Closes #7487