Uploaded image for project: 'Hippo Site Toolkit 2'
  1. Hippo Site Toolkit 2
  2. HSTTWO-3380

Forward port [10.1] Can not include html file into freemarker template

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.1.0
    • Component/s: None
    • Environment:
      Hippo CMS 10.0.1
      Hippo CMS 10.0.2
    • Similar issues:

      Description

      When I try to include an html file into my freemarker template the log tells that the file doesn't exist.

      base-layout.ftl:

      <!doctype html>
      <#include "../include/imports.ftl">
      <#include "./index.ftl">
      

      index:html

      <#include "../include/imports.ftl">
      <#assign language = "${hstRequest.requestContext.resolvedMount.mount.locale?keep_before('_')}">
      <!--[if IE 8]> <html lang="${language}" class="ie8"> <![endif]-->
      <!--[if IE 9]> <html lang="${language}" class="ie9"> <![endif]-->
      <!--[if !IE]><!--> <html lang="${language}"> <![endif]-->
      	<head>
      		<meta charset="utf-8"/>
      		
      		<!-- Web Fonts -->
      		<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600&amp;subset=cyrillic,latin">		
      
      		<!-- CSS Global Compulsory -->
      		<link rel="stylesheet" href="<@hst.webfile  path="/css/global/bootstrap.min.css"/>" type="text/css"/>
      		<link rel="stylesheet" href="<@hst.webfile  path="/css/global/style.css"/>" type="text/css"/>
      
      		<!-- CSS Header -->
      		<link rel="stylesheet" href="<@hst.webfile  path="/css/header/header-v6.css"/>" type="text/css"/>
      		
      		<!-- CSS Footer -->
      		<link rel="stylesheet" href="<@hst.webfile  path="/css/footer/footer-v3.css"/>" type="text/css"/>
      		
      		<!-- CSS Implementing Plugins -->
      		<link rel="stylesheet" href="<@hst.webfile  path="/css/global/plugins/animate.css"/>" type="text/css">
      		<link rel="stylesheet" href="<@hst.webfile  path="/css/global/plugins/line-icons/line-icons.css"/>" type="text/css">
      	<!--	
      		<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
      	-->
      		<link rel="stylesheet" href="<@hst.webfile  path="/css/global/plugins/font-awesome/css/font-awesome.min.css"/>" type="text/css">
      	 
      		<!-- CSS Theme -->
      		<link rel="stylesheet" href="<@hst.webfile  path="/css/theme-skin/dark.css"/>" type="text/css" id="style_color"/>
      		<link rel="stylesheet" href="<@hst.webfile  path="/css/theme-color/aqua.css"/>" type="text/css"/>
      
      		<!-- CSS Customization -->
      		<link rel="stylesheet" href="<@hst.webfile  path="/css/global/custom.css"/>" type="text/css"/>
      		
      		<@hst.defineObjects/>
      			<#if hstRequest.requestContext.cmsRequest>
      				<link rel="stylesheet" href="<@hst.webfile  path="/css/cms-request.css"/>" type="text/css"/>
      			</#if>
      		<@hst.headContributions categoryExcludes="htmlBodyEnd, scripts" xhtml=true/>
      	</head>
      	
      	<body class="header-fixed header-fixed-space">
          <skins>
            <div class="wrapper">
              <#include "base-header.ftl">
            </div>
          </skins>
          
          <!-- Commmon files to be cached -->
          <script src="/__build__/common.js"></script>
          <!-- Angular2 files -->
          <script src="/__build__/angular2.js"></script>
          <!-- App script -->
          <script src="/__build__/skins.js"></script>
          <!-- TODO: replace /app-simple.js with /app.js -->
        </body>
      </html>
      

      Error in the logs:

       18:57:16 WARN  Template inclusion failed (for parameter value "index.html"):
      [INFO] [talledLocalContainer] Repository templateSource '/webfiles/site/freemarker/adws/index.html' not found
      [INFO] [talledLocalContainer] 
      [INFO] [talledLocalContainer] ----
      [INFO] [talledLocalContainer] FTL stack trace ("~" means nesting-related):
      [INFO] [talledLocalContainer] 	- Failed at: #include "index.html"  [in template "webfile:/freemarker/adws/base-layout.ftl" at line 3, column 1]
      [INFO] [talledLocalContainer] ----. To see the stack trace, set 'org.hippoecm.hst.servlet.HstFreemarkerServlet' log-level to debug in log4j configuration or runtime via the logging servlet
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                aschrijvers Ard Schrijvers
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: