Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-35912

Changing script language to Extensible Stylesheet (XSL) in Web Content Template Editor throws console errors

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.2.0 CE M6
    • Fix Version/s: 6.2.0 CE B1
    • Labels:
      None
    • Environment:
      Tomcat 7. + MySQL 5. Portal 6.2.x GIT ID: 96a14ff9d80c7e9c7600d6c939cf25222bb22556.
    • Fix Priority:
      4

      Description

      Steps to reproduce:

      1. Click Admin > Site Administration > Web Content > Manage > Structures
      2. Add a Structure with a name and a text field
      3. Add a Template based on the Structure (clicking Actions > Manage Templates next to the Structure)
        • Within the Template editor, change the language to Extensible Stylesheet Language (XSL)

      Expected result:
      The Template editor will change to XSL.

      Actual result:
      The Template script editor goes blank (see screenshot) and throws the following console error:

      23:09:23,503 ERROR [http-bio-8080-exec-10][IncludeTag:198] Current URL /group/control_panel/manage?p_auth=zEEmESx5&p_p_id=166&p_p_lifecycle=1&p_p_state=pop_up&p_p_mode=view&doAsGroupId=10181&_166_refererPortletName=15&_166_refererWebDAVToken=journal&_166_showManageTemplates=true&_166_scopeTitle=Structures&_166_struts_action=%2Fdynamic_data_mapping%2Fedit_template&_166_showGlobalScope=false generates exception: com.liferay.portal.kernel.template.StringTemplateResource cannot be cast to com.liferay.portal.xsl.XSLTemplateResource
      23:09:23,508 ERROR [http-bio-8080-exec-10][IncludeTag:157] java.lang.ClassCastException: com.liferay.portal.kernel.template.StringTemplateResource cannot be cast to com.liferay.portal.xsl.XSLTemplateResource
              at com.liferay.portal.xsl.XSLManager.doGetTemplate(XSLManager.java:70)
              at com.liferay.portal.template.BaseTemplateManager$DoGetTemplatePrivilegedAction.run(BaseTemplateManager.java:81)
              at com.liferay.portal.template.BaseTemplateManager$DoGetTemplatePrivilegedAction.run(BaseTemplateManager.java:1)
              at com.liferay.portal.template.BaseTemplateManager.getTemplate(BaseTemplateManager.java:52)
              at com.liferay.portal.template.BaseTemplateManager.getTemplate(BaseTemplateManager.java:37)
              at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
              at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
              at com.liferay.portal.kernel.template.TemplateManagerUtil.getTemplate(TemplateManagerUtil.java:90)
              at com.liferay.portlet.dynamicdatamapping.util.DDMTemplateHelperImpl.getAutocompleteTemplateVariableDefinitions(DDMTemplateHelperImpl.java:190)
              at com.liferay.portlet.dynamicdatamapping.util.DDMTemplateHelperImpl.getAutocompleteJSON(DDMTemplateHelperImpl.java:79)
              at com.liferay.portlet.dynamicdatamapping.util.DDMTemplateHelperUtil.getAutocompleteJSON(DDMTemplateHelperUtil.java:36)
              at org.apache.jsp.html.portlet.dynamic_005fdata_005fmapping.edit_005ftemplate_jsp._jspService(edit_005ftemplate_jsp.java:2669)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
              at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:295)
              at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192)
              at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:82)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 15 weeks, 5 days ago

                  Packages

                  Version Package
                  6.2.0 CE B1