CMS Development

enrico_bianchet
Mitglied

Header Publish error

Hi,

i've a problem with my header file. I can not able to save upodates because

I get the following errors that prevent me from publishing updates:

 

"Template does not include the tag {{ standard_footer_includes }}. Needed for HubSpot analytics"

 

It's the header and obviosly need to contain only a part of the code of the whole page.

 

How can i solve this matter?

Thanks

0 Upvotes
8 Antworten
MatthewShepherd
Autorität

Header Publish error

Hi @enrico_bianchet 

Can you share your header code? (use the insert code feature of the HS community text editor)

Matthew Shepherd

Freelance HubSpot Consultant
CRM Consultant | SEO Specialist

Did my post help answer your query?Help the community by marking it as a solution.
0 Upvotes
enrico_bianchet
Mitglied

Header Publish error

Hi @MatthewShepherd ,

sure.

Thanks for your reply.

Enrico

 

<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>{{ content.html_title }}</title>
    <meta name="description" content="{{ content.meta_description }}">
    {{ standard_header_includes }}
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css">
    <link rel="stylesheet" href="{{ get_public_template_url('Coded files/Custom/blog/blog-styles.css') }}" >
  </head>
  <body>
    <nav class="navbar-fixed-top">
      <div class="container-fluid navbar-cont">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="logo" href="{{ group.absolute_url }}"><img src="https://cdn2.hubspot.net/hubfs/XXXXXXX/logo.svg" onerror="this.onerror=null; this.src='https://cdn2.hubspot.net/hubfs/XXXXXXX/logo.png'"></a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li class="cerca-nav">{% module "module_XXXXXXX" module_id="XXXXXXX" label="Site Search Input", overrideable=False %}</li>
            <li><a href="{{ group.absolute_url }}/all">All stories</a>
              {% if slug is string_startingwith "en" %}{% set my_topics = blog_topics('XXXXXXX', 😎 %} {% else %}{% set my_topics = blog_topics('XXXXXXX', 😎 %} {% endif %}
              <ul class="sub-m">
                {% for item in my_topics %}
                <li><a href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }}</a></li>
                {% endfor %}
              </ul>
            </li>
            <li><a href="https://www.example.com{% if slug is string_startingwith "en" %}/en{% else %}/it{% endif %}" target="_blank">Website</a></li>
          </ul>
        </div><!--/.nav-collapse -->
        <div class="lens">{#<a href="#"><img src="https://cdn2.hubspot.net/hubfs/XXXXXXX/lens.svg" onerror="this.onerror=null; this.src='https://cdn2.hubspot.net/hubfs/XXXXXXX/lens.png'"></a>#}</div>
      </div>
    </nav>
MatthewShepherd
Autorität

Header Publish error

Hi @enrico_bianchet 

 

When creating your new coded template did you select Template or Template Partial? If you selected Template instead of Template Partial Hubspot is expecting your full template code, including the required  {{ standard_footer_includes }} directly before the closing body tag.

 

 

hs-part-temp.png

 

Matthew Shepherd

Freelance HubSpot Consultant
CRM Consultant | SEO Specialist

Did my post help answer your query?Help the community by marking it as a solution.
0 Upvotes
enrico_bianchet
Mitglied

Header Publish error

Hi @MatthewShepherd ,

it's not made by me.
There's a way to check how was created and eventually revert it in another type?
Thanks
Enrico

 

0 Upvotes
MatthewShepherd
Autorität

Header Publish error

Hi @enrico_bianchet 

Did you find a solution to your issue?

Matthew Shepherd

Freelance HubSpot Consultant
CRM Consultant | SEO Specialist

Did my post help answer your query?Help the community by marking it as a solution.
0 Upvotes
beatrizarntz
Mitglied

Header Publish error

How do I add these strings manually?

0 Upvotes
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Header Publish error

@enrico_bianchet , i would just copy the code and create a new file making sure to select partial. 

@beatrizarntz , unclear what strings to which you refer

MatthewShepherd
Autorität

Header Publish error

Hi @enrico_bianchet 

When you create a partial template file it usually contains the comments

<!-- Begin partial -->

<!-- End partial -->

Is this a template you sourced through the Hubspot Marketplace? If so what is the template name?

Otherwise, can you list the files that make up your template file? 

 

Do you know what code you added to this file since it was last successfully published? (You can view revisions as follows)

 

 

 

hs-test-head-rev.png

 

 

Matthew Shepherd

Freelance HubSpot Consultant
CRM Consultant | SEO Specialist

Did my post help answer your query?Help the community by marking it as a solution.
0 Upvotes