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

Code inside <liferay-util:html-top is not included in header

    Details

      Description

      <liferay-util:html-top> taglib is supposed to include the content of the body in the header of the page. This is intended for css, js, etc.

      However, it seems that it's no longer including that content in the header. For example, in alloyeditor.jsp we have the following code:

      	<liferay-util:html-top outputKey="js_editor_alloyeditor_skip_editor_loading">
      		<link href="<%= PortalUtil.getStaticResourceURL(request, themeDisplay.getCDNHost() + themeDisplay.getPathEditors() + "/alloyeditor/assets/alloy-editor-atlas.css") %>" rel="stylesheet" type="text/css" />
      
      		<%
      		long javaScriptLastModified = PortalWebResourcesUtil.getLastModified(PortalWebResourceConstants.RESOURCE_TYPE_EDITORS);
      		%>
      
      		<script src="<%= HtmlUtil.escape(PortalUtil.getStaticResourceURL(request, themeDisplay.getCDNHost() + themeDisplay.getPathEditors() + "/ckeditor/ckeditor.js", javaScriptLastModified)) %>" type="text/javascript"></script>
      
      		<script src="<%= HtmlUtil.escape(PortalUtil.getStaticResourceURL(request, themeDisplay.getCDNHost() + themeDisplay.getPathEditors() + "/alloyeditor/liferay-alloy-editor-no-ckeditor-min.js", javaScriptLastModified)) %>" type="text/javascript"></script>
      
      		<script type="text/javascript">
      			AlloyEditor.regexBasePath = /(^|.*[\\\/])(?:liferay-alloy-editor[^/]+|liferay-alloy-editor)\.js(?:\?.*|;.*)?$/i;
      
      			Liferay.namespace('EDITORS')['<%= editorName %>'] = true;
      		</script>
      	</liferay-util:html-top>
      

      That should be included when adding a blog entry from blogs portlet (because it uses AlloyEditor) but it's not.

      An easy way to test this with CKEditor is to:

      1. Click the '+' to open the add panel
      2. Click 'Add New' -> Basic Web Content

      Expected result:
      Dialog opens with CKEditor

      Actual result:
      Ckeditor does not load, because the lines that bring ckeditor.js are inside the html-top tag. See above.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              anthony.chu Anthony Chu
              Reporter:
              sergio.gonzalez Sergio Gonzalez (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 48 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 Alpha 1