# Can't publish a layout

**URL:** <https://community.hubspot.com/t/cant-publish-a-layout/111689>\
**Category:** CMS Development\
**Created:** [July 11, 2024, 3:11pm UTC](https://community.hubspot.com/t/cant-publish-a-layout/111689 "2024-07-11T15:11:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![WShek](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@WShek](https://community.hubspot.com/u/WShek)\
**Post date:** [July 11, 2024, 3:11pm UTC](https://community.hubspot.com/t/cant-publish-a-layout/111689/1 "2024-07-11T15:11:30Z")

</div>

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

The error message says nothing at all

 ![Screenshot 2024-07-11 at 11.08.57 AM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/0/709b2e4064401215af94285a79ee483334e0e061.jpeg)

here is my template code

```lia-code-sample
<!--
 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

> <https://github.com/HubSpot/cms-theme-boilerplate/blob/main/src/templates/layouts/base.html>

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [July 11, 2024, 3:33pm UTC](https://community.hubspot.com/t/cant-publish-a-layout/111689/2 "2024-07-11T15:33:03Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [July 11, 2024, 3:36pm UTC](https://community.hubspot.com/t/cant-publish-a-layout/111689/3 "2024-07-11T15:36:42Z")

</div>

Hi @WShek,

try changing this part:

```lia-code-sample
<!--
 templateType: none
-->

```

to:

```lia-code-sample
<!--
 templateType: page
 label: Base layout
 isAvailableForNewContent: false
-->

```

best,

Anton

---

<div class="post-metadata">

**Author:** ![WShek](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@WShek](https://community.hubspot.com/u/WShek)\
**Post date:** [July 11, 2024, 3:41pm UTC](https://community.hubspot.com/t/cant-publish-a-layout/111689/4 "2024-07-11T15:41:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [July 11, 2024, 4:22pm UTC](https://community.hubspot.com/t/cant-publish-a-layout/111689/5 "2024-07-11T16:22:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![WShek](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@WShek](https://community.hubspot.com/u/WShek)\
**Post date:** [July 11, 2024, 6:05pm UTC](https://community.hubspot.com/t/cant-publish-a-layout/111689/6 "2024-07-11T18:05:20Z")

</div>

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?
