java - Liferay 6.1 - 私有(private)插件安装程序 "disapear"或在控制面板中被禁用

标签 java liferay portlet

我正在为 Liferay 6.1 EE GA3 开发应用程序。

在控制面板下,我们有私有(private)插件安装程序部分,我们可以在其中安装/部署新的 portlet。我正在使用面板并且该部分工作正常。

然后我尝试安装自定义 portlet。由于某种原因,安装失败,我从“部署”文件夹中删除了 portlet,甚至重新启动了服务器。这个 portlet 没有做任何特别的事情,它只是针对 Liferay 的 Lucene 搜索引擎运行一些自定义查询。

然后,在此过程之后,“服务器 > 插件安装 > 私有(private)插件安装程序”部分从我的屏幕上“消失”了。

下面是我访问“服务器 > 服务器管理”和“服务器 > 插件安装”部分时看到的屏幕(你可以看到它显示为空,没有私有(private)插件安装程序的链接):

屏幕截图 1:服务器 > 服务器管理(显示空白屏幕)

enter image description here

屏幕截图 2:服务器 > 插件安装(显示空白屏幕)

enter image description here

这是您可以看到我的用户具有安装插件所需的所有管理权限的屏幕:

屏幕截图 3:我的用户个人资料和权限 enter image description here

在下面的屏幕中,您可以看到 Private Plugin 安装程序 Hook 安装在 webapps 文件夹中(实际上它一直都在安装)以及其他一些 hook、主题和 portlets:

屏幕截图 4:Tomcat 的 webaaps 文件夹 enter image description here

这是/html/portlet/admin/view.jsp 和/html/portlet/admin/view.portal.jsp 的内容(从代码中删除了初始注释)。这些文件不是手动编辑的。

/html/portlet/admin/view.jsp 的内容

<%@ include file="/html/portlet/admin/view.portal.jsp" %>

/html/portlet/admin/view.portal.jsp 的内容

<%@ include file="/html/portlet/admin/init.jsp" %>

<c:choose>
    <c:when test="<%= permissionChecker.isOmniadmin() %>">

        <%
        String tabs1 = ParamUtil.getString(request, "tabs1", "server");

        boolean showTabs1 = false;

        if (portletName.equals(PortletKeys.ADMIN_INSTANCE)) {
            tabs1 = "instances";
        }
        else if (portletName.equals(PortletKeys.ADMIN_PLUGINS)) {
            tabs1 = "plugins";
        }
        else if (portletName.equals(PortletKeys.ADMIN_SERVER)) {
            tabs1 = "server";
        }
        else if (portletName.equals(PortletKeys.ADMIN)) {
            showTabs1 = true;
        }

        String tabs2 = ParamUtil.getString(request, "tabs2");
        String tabs3 = ParamUtil.getString(request, "tabs3");

        if (tabs1.equals("plugins")) {
            if (!tabs2.equals("portlet-plugins") && !tabs2.equals("theme-plugins") && !tabs2.equals("layout-template-plugins") && !tabs2.equals("hook-plugins") && !tabs2.equals("web-plugins")) {
                tabs2 = "portlet-plugins";
            }
        }

        int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
        int delta = ParamUtil.getInteger(request, SearchContainer.DEFAULT_DELTA_PARAM);

        PortletURL portletURL = renderResponse.createRenderURL();

        portletURL.setParameter("struts_action", "/admin/view");
        portletURL.setParameter("tabs1", tabs1);
        portletURL.setParameter("tabs2", tabs2);
        portletURL.setParameter("tabs3", tabs3);
        %>

        <portlet:renderURL var="redirectURL">
            <portlet:param name="struts_action" value="/admin/view" />
            <portlet:param name="tabs1" value="<%= tabs1 %>" />
            <portlet:param name="tabs2" value="<%= tabs2 %>" />
            <portlet:param name="tabs3" value="<%= tabs3 %>" />
            <portlet:param name="cur" value="<%= String.valueOf(cur) %>" />
        </portlet:renderURL>

        <aui:form action="<%= portletURL.toString() %>" method="post" name="fm">
            <aui:input name="<%= Constants.CMD %>" type="hidden" />
            <aui:input name="tabs1" type="hidden" value="<%= tabs1 %>" />
            <aui:input name="tabs2" type="hidden" value="<%= tabs2 %>" />
            <aui:input name="tabs3" type="hidden" value="<%= tabs3 %>" />
            <aui:input name="redirect" type="hidden" value="<%= redirectURL %>" />
            <aui:input name="portletId" type="hidden" />

            <c:if test="<%= showTabs1 %>">
                <liferay-ui:tabs
                    names="server,instances,plugins"
                    url="<%= portletURL.toString() %>"
                />
            </c:if>

            <c:choose>
                <c:when test='<%= tabs1.equals("server") %>'>
                    <%@ include file="/html/portlet/admin/server.jspf" %>

                    <aui:script use="liferay-admin">
                        new Liferay.Portlet.Admin(
                            {
                                form: document.<portlet:namespace />fm,
                                namespace: '<portlet:namespace />',
                                url: '<portlet:actionURL><portlet:param name="struts_action" value="/admin/edit_server" /></portlet:actionURL>'
                            }
                        );
                    </aui:script>
                </c:when>
                <c:when test='<%= tabs1.equals("instances") %>'>
                    <%@ include file="/html/portlet/admin/instances.jspf" %>
                </c:when>
                <c:when test='<%= tabs1.equals("plugins") %>'>

                    <%
                    PortletURL marketplaceURL = null;

                    if ((PrefsPropsUtil.getBoolean(PropsKeys.AUTO_DEPLOY_ENABLED, PropsValues.AUTO_DEPLOY_ENABLED) || PortalUtil.isOmniadmin(user.getUserId())) && PortletLocalServiceUtil.hasPortlet(themeDisplay.getCompanyId(), PortletKeys.MARKETPLACE_STORE)) {
                        marketplaceURL = ((RenderResponseImpl)renderResponse).createRenderURL(PortletKeys.MARKETPLACE_STORE);
                    }

                    boolean showEditPluginHREF = false;
                    boolean showReindexButton = true;
                    %>

                    <%@ include file="/html/portlet/plugins_admin/plugins.jspf" %>
                </c:when>
            </c:choose>
        </aui:form>

        <aui:script>
            function <portlet:namespace />saveServer(cmd) {
                document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = cmd;
                document.<portlet:namespace />fm.<portlet:namespace />redirect.value = "<portlet:renderURL><portlet:param name="struts_action" value="/admin/view" /><portlet:param name="tabs1" value="<%= tabs1 %>" /><portlet:param name="tabs2" value="<%= tabs2 %>" /><portlet:param name="tabs3" value="<%= tabs3 %>" /><portlet:param name="<%= SearchContainer.DEFAULT_CUR_PARAM %>" value="<%= String.valueOf(cur) %>" /><portlet:param name="<%= SearchContainer.DEFAULT_DELTA_PARAM %>" value="<%= String.valueOf(delta) %>" /></portlet:renderURL>";
                submitForm(document.<portlet:namespace />fm, "<portlet:actionURL><portlet:param name="struts_action" value="/admin/edit_server" /></portlet:actionURL>");
            }
        </aui:script>
    </c:when>
    <c:otherwise>
        <liferay-util:include page="/html/portal/portlet_access_denied.jsp" />
    </c:otherwise>
</c:choose>

感谢您的关注

最佳答案

我不太确定会发生什么,但根据您的描述和列出一些问题的评论,我有一些想法:

  • 您可能想要安装 Private Plugins Installer来自市场,可能从您正在运行的版本更新
  • 如果存在重叠(冲突)的 view.jsp,您可能需要向后移植 this ext plugin到 6.1 并标记冲突覆盖。如果您已经有冲突,则必须恢复原始 jsp,因为它可能在部署冲突 Hook 期间已被删除。
  • 正如您所说的这些问题在 Liferay EE 上,打开支持票很可能会帮助您 - 这就是它的目的
  • 如果您的日志文件太大而没有意义:检查它是否可以追溯到远古时代,例如也许您只需要最后几千字节。在那种情况下:缩短它并设置对数旋转。如果所有 GB 都是最近生成的,那么要么是日志记录过多,要么是遇到了一些问题,应该尽早解决。

关于java - Liferay 6.1 - 私有(private)插件安装程序 "disapear"或在控制面板中被禁用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28772267/

相关文章:

java - Spring MVC Portlet 操作映射不起作用

java - 碲中的 Portlet 支持

java - JSF 外部链接

java - 字符串格式(或类似功能)或 PreparedStatement

java - 如何在 JPA Criteria API 中投影单个列?

gulp - 构建 Liferay 主题失败并出现错误 "Cannot find module ' liferay-font-awesome'"

liferay - 如何使用电子邮件/密码对外部 Web 应用程序使用 Liferay 身份验证

java - 编译时性能成本

java - 在 JSF/RichFaces `dataTable` 中拥有 boolean 复选框的正确方法是什么?

java - 如何设置门户组件:resourceURL to output https URL?