【问题标题】:Error occures when deploying theme to liferay portal. "No theme found for specified theme id ."将主题部署到 liferay 门户时发生错误。 “找不到指定主题 ID 的主题。”
【发布时间】:2012-07-28 02:30:30
【问题描述】:

我根据liferay教程创建了示例主题,即custom.css,不知道为什么我的主题没有部署,在日志文件中是下一个内容: “找不到指定主题 ID 的主题。返回默认主题。” 在“管理->页面->外观”的主题中没有我的主题

【问题讨论】:

    标签: java deployment themes liferay-6


    【解决方案1】:

    当您已将主题应用到站点(社区)但该主题当前未部署时,将显示此警告消息。这可能是由于您最近对主题所做的更改而发生的。请尝试恢复您所做的更改,并确保您的主题在部署时成功注册。

    如果问题仍然存在,请让我们知道错误日志声明或您对主题所做的确切更改。


    我认为您的主题正在部署到 glassfish,但没有注册到 Liferay。

    您的部署过程中可能存在问题,请您在您的 portal-ext.properties 文件中相应地设置这些属性

    '
    #
    # Set this to true to enable auto deploy of layout templates, portlets, and
    # themes.
    #
    auto.deploy.enabled=true
    
    #
    # Set the directory to scan for layout templates, portlets, and themes to
    # auto deploy.
    #
    auto.deploy.deploy.dir=${liferay.home}/deploy
    
    #
    # Set the directory where auto deployed WARs are copied to. The application
    # server or servlet container must know to listen on that directory.
    # Different containers have different hot deploy paths. For example, Tomcat
    # listens on "${catalina.base}/webapps" whereas JBoss listens on
    # "${jboss.server.home.dir}/deploy". Set a blank directory to automatically
    # use the application server specific directory.
    #
    auto.deploy.dest.dir=
    auto.deploy.default.dest.dir=../webapps
    auto.deploy.geronimo.dest.dir=${org.apache.geronimo.home.dir}/deploy
    auto.deploy.glassfish.dest.dir=${com.sun.aas.instanceRoot}/autodeploy
    auto.deploy.jboss.dest.dir=${jboss.server.home.dir}/deploy
    auto.deploy.jetty.dest.dir=${jetty.home}/webapps
    auto.deploy.jonas.dest.dir=${jonas.base}/deploy
    auto.deploy.resin.dest.dir=${resin.home}/webapps
    auto.deploy.tomcat.dest.dir=${catalina.base}/webapps
    auto.deploy.weblogic.dest.dir=${env.DOMAIN_HOME}/autodeploy
    

    '

    在针对 glassfish 进行配置后,您应该会看到日志消息说

    mytheme 的 1 个主题已成功注册。

    【讨论】:

    • 我只是更改了_diffs/custom.css 中的样式来检查更改,它包含“body{display:none;}”,它没有更改。
    • 您的更改可能不是您所面临问题的原因。您需要检查的几件事: 1. custom.css 应该在 _diffs/css/custom.css 中,但您说的是 _diffs/custom.css。你能重新检查一下吗? 2. main.css 中添加了custom.css 3. 请重启服务器并删除浏览器缓存。这是为了确保您已清除缓存。
    • 对不起,我写错了,其实是在_diffs/css/custom.css中
    • 这里是“ant deploy”textsave.de/?p=130814textsave.de/?p=130817的日志文件
    【解决方案2】:

    如果您使用的是 DEV/QA 环境,请更新 portal-ext.properties 文件:

    include-and-override=portal-developer.properties

    如果这是在 Staging/Production 上,请在部署更新版本之前尝试从服务器上的 YourThemeName/ 目录中删除 /css 文件夹。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-02
      • 1970-01-01
      • 1970-01-01
      • 2018-06-13
      • 1970-01-01
      相关资源
      最近更新 更多