Can't publish a layout

Hi I am having problem publishing layout through the Designer Manager.

The error message says nothing at all

here is my template code

<!--
 templateType: none
-->
<!DOCTYPE html>
<html lang="{{ html_lang }}" {{ html_lang_dir }}>
 <head>
 <meta charset="utf-8" />
 {% if page_meta.html_title or pageTitle %}
 <title>{{ page_meta.html_title or pageTitle }}</title>
 {% endif %} 
 {% if brand_settings.primaryFavicon.src %}
 <link rel="shortcut icon" href="{{ brand_settings.primaryFavicon.src }}" />
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 {% endif %}

 <link
 rel="preload"
 href="//static.staticdj.com/oss/operation/3e7f038b85daa739336e4a3476c687f2.ttf"
 as="font"
 type="font/ttf"
 crossorigin
 />
 <link
 rel="preload"
 href="//static.staticdj.com/oss/operation/bc12a41ea4ac3afe67e32fc9e0c36c58.woff2"
 as="font"
 type="font/woff2"
 crossorigin
 />
 <link
 rel="preload"
 href="//static.staticdj.com/oss/operation/960abc5f7075d7c0e699c28b70303531.woff2"
 as="font"
 type="font/woff2"
 crossorigin
 />

 <meta name="description" content="{{ page_meta.meta_description }}" />
 {{ require_css(get_asset_url("../../css/main.css")) }} {# This is intended
 to be used if a template requires template specific style sheets #} 
 {% if
 template_css %} {{ require_css(get_asset_url(template_css)) }} 
 {% endif %}
 {# {{ require_css(get_asset_url("../../css/theme-overrides.css")) }} #}
 {# To see
 a full list of what is included via standard_header_includes please
 reference this article:
 https://developers.hubspot.com/docs/cms/hubl/variables#required-page-template-variables
 #} {{ standard_header_includes }}
 </head>
 <body class="nova tw-bg-white tw-text-black tw-text-px-14 tw-leading-1.3" style="padding-bottom: 120px;">
 {# {% global_partial path="../partials/announcement.html" %} #}

 <div class="body-wrapper {{ builtin_body_classes }}">
 {% block header %} 
 {% global_partial path="../partials/header.html" %} 
 {% endblock header %} 
 {# The main-content ID is used for the navigation
 skipper in the header.html file. More information on the navigation
 skipper can be found here:
 https://github.com/HubSpot/cms-theme-boilerplate/wiki/Accessibility #}

 <main id="main-content" class="main-content body-container-wrapper">
 {% block body %} {% endblock body %}
 </main>

 {% block footer %} 
 {% global_partial path="../partials/footer.html" %} 
 {% endblock footer %}
 </div>

 {{require_js(get_asset_url('../../js/jquery-3.7.1.min.js'))}}

 {# To see a full list of
 what is included via standard_footer_includes please reference this article:
 https://developers.hubspot.com/docs/cms/hubl/variables#required-page-template-variables
 #} 
 {{ standard_footer_includes }}
 {% global_partial path="../partials/calendar-modal.html" %} 
 </body>
 {{require_js(get_asset_url('../../js/utils.js'))}} 
 {{require_js(get_asset_url('../../js/image-lazyload.js'))}} 
 {{require_js(get_asset_url("../../js/slick.js"),{position: "footer", defer: "true"})}}
 {{require_js(get_asset_url("../../js/main.js"), {position: "footer", defer: "true"})}} 
 {{require_js(get_asset_url("../../js/modal.js"), {position: "footer", defer: "true"})}} 
 {{require_js(get_asset_url("../../js/iframe_api.js"), {position: "footer", defer: "true"})}}
</html>

but even i replace with the boilerplate code from the link below, the error still persists. Need help on this. Thank you very much

Hey @WShek

I’ve copied the code that you’vve modified and tested in a demo theme. I’m not seeing the error that you see. Based on the lack of an error message in the design manager and in a local instance I’d venture to bet this is an fluke error. I would suggest a hard refresh and cache clear. If it persists I would roll the changes back 1 line at a time to see if its a partiacular import or tg that’s causing the issues. But again this might be a fluke.

Kepp us posted as you work through this!

Hi @WShek,

try changing this part:

<!--
 templateType: none
-->

to:

<!--
 templateType: page
 label: Base layout
 isAvailableForNewContent: false
-->

best,

Anton

Hi @Kevin-C and @Anton , thank you for reply.

I tried @Anton’s solutions. Indeed it allows me to publish but all of my templates are still not appearing when I create a new page.

I have the same theme running on my sandbox and everything is running correctly. I can publish the code without any modification and all of the templates are showing.

Have you made sure that all other templates have a proper “templateType” like page, blog_listing, blog_post… and “isAvailableForNewContent” is set to “true”?

best,

Anton

Hi Anton,

upon trying to upload files through github action, I received error about the layout.

The error said cannot update template coz the template is used by live content.

Would you have an idea about it?