diff --git a/portal-web/docroot/html/portlet/wiki/top_links.jsp b/portal-web/docroot/html/portlet/wiki/top_links.jsp
index 5cfa69591f522413077b2508d633d431ac40b44e..8597619b03fbabc0b0ad49071902034781a8e330 100644
--- a/portal-web/docroot/html/portlet/wiki/top_links.jsp
+++ b/portal-web/docroot/html/portlet/wiki/top_links.jsp
@@ -29,13 +29,9 @@ if (Validator.isNotNull(strutsAction)) {
 	}
 }
 
-String redirect = ParamUtil.getString(request, "redirect");
-
 WikiNode node = (WikiNode)request.getAttribute(WebKeys.WIKI_NODE);
 WikiPage wikiPage = (WikiPage)request.getAttribute(WebKeys.WIKI_PAGE);
 
-String keywords = ParamUtil.getString(request, "keywords");
-
 List<WikiNode> nodes = WikiUtil.getNodes(allNodes, hiddenNodes, permissionChecker);
 
 boolean print = ParamUtil.getString(request, "viewMode").equals(Constants.PRINT);
@@ -51,7 +47,7 @@ if (categoryId > 0) {
 }
 %>
 
-<c:if test='<%= !strutsAction.endsWith("view_page_attachments") %>'>
+<c:if test='<%= !strutsAction.endsWith("view_page_activities") && !strutsAction.endsWith("view_page_attachments") %>'>
 	<portlet:actionURL var="undoTrashURL">
 		<portlet:param name="struts_action" value="/wiki/edit_page" />
 		<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.RESTORE %>" />
@@ -62,7 +58,7 @@ if (categoryId > 0) {
 
 <c:if test="<%= portletName.equals(PortletKeys.WIKI_ADMIN) %>">
 	<liferay-ui:header
-		backURL="<%= redirect %>"
+		backURL="<%= portletURL.toString() %>"
 		localizeTitle="<%= false %>"
 		title="<%= node.getName() %>"
 	/>
