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

Liferay 6.1 - Private Plugin installer "disapear" or is disabled in Control panel

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

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

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

然后,在此过程之后,"Server > Plugins installation > Private plugin installer" 部分出现在我的屏幕上 "disapeared"。

下面是我访问 "Server > Server Administration" 和 "Server > Plugins installation" 部分时看到的屏幕(您可以看到它看起来是空的,没有私人插件安装程序的 link) :

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

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

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

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

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

屏幕截图 4:Tomcat 的 webaaps 文件夹

这是 /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,因为它可能在部署冲突挂钩期间已被删除。
  • 正如您所说的这些问题在 Liferay EE 上,打开支持票很可能会帮助您 - 这就是目的
  • 如果您的日志文件太大而没有意义:检查它是否可以追溯到远古时代,例如也许您只需要最后几千字节。在那种情况下:缩短它并设置对数旋转。如果所有的千兆字节都是最近生成的,要么是你记录的太多,要么是你遇到了一些问题,你应该尽快解决。

尝试清理服务器的临时文件夹和工作文件夹。这可能会有帮助!!

我已经放弃解决这个问题,但我设法完成了这项工作。

我正在开发一个使用 Lucene 操作和搜索内容(来自 Liferay 文档库)的 portlet,因此,我停止并重新启动了我的 Liferay 实例,并在 portal-ext.properties[= 中取消注释了以下行10=]

index.on.startup=真

令我惊讶的是,在重新索引所有门户内容并完成启动过程后,链接 "Server > Server Administration"、"Server > Plugins installation" 和私有插件安装程序再次运行。我不会撒谎:我不知道为什么 "index.on.startup=true" 解决了这个问题。如果有人对此有一些想法或理论,我会很高兴听到。感谢您的帮助。