# Trying to fix warnings caused by include/import inside global\_partial

**URL:** <https://community.hubspot.com/t/trying-to-fix-warnings-caused-by-include-import-inside-global-partial/70410>\
**Category:** CMS Development\
**Created:** [December 1, 2022, 9:52pm UTC](https://community.hubspot.com/t/trying-to-fix-warnings-caused-by-include-import-inside-global-partial/70410 "2022-12-01T21:52:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tw-martijn](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@tw-martijn](https://community.hubspot.com/u/tw-martijn)\
**Post date:** [December 1, 2022, 9:52pm UTC](https://community.hubspot.com/t/trying-to-fix-warnings-caused-by-include-import-inside-global-partial/70410/1 "2022-12-01T21:52:16Z")

</div>

Recently I started to use the

?hsDebug=true

query parameter to dive into some weird loadings I was seeing with our theme. I believe it is all fixed now, except some warnings I have been unable to fix. They do not seem to affect our pages, but they make it a lot harder to spot new warnings being introduced.

The general structure of our theme follows the often cited cms-theme-boilerplate: templates includes a folder layouts with a base.html that uses 2 {% global\_partial %} tags to pull in separate header and footer files:

```lia-code-sample
		{% block header %}
			{% global_partial path='../global-partials/site-header.html' %}
		{% endblock header %}

		{% block body %}
		{% endblock body %}

		{% block footer %}
			{% global_partial path='../global-partials/site-footer.html' %}
		{% endblock footer %}

```

These partials make use of {% include %} and {% import %}. Example:

```lia-code-sample
<!--
 templateType: global_partial
 label: Site Header
-->
{% include '../../languages/lang.html' %}
{% import '../../components/all.html' as component %}
{% import '../../inc/all.html' as sleek %}

```

This results in a bunch of warnings like:

`TemplateError{severity=WARNING, reason=MISSING, item=TEMPLATE, message='Warning in `refapp-theme/templates/global-partials/site-header.html` on line 3: Resolving path ../../languages/lang.html from parent template, use relative path from module instead', fieldName='path', lineno=2, startPosition=1, scopeDepth=3, category=MODULE_PATH_FALLBACK, categoryErrors={path=../../languages/lang.html}}`

This confuses me and I have been unable to get rid of these warnings. What is a parent template here? There is just the one base.html. Why talk of modules when we are inside a template? And why tell me to use a relative path when the path is already relative?

It is doubly confusing because it does work. The files are included/imported, as variables and macros respectively are made available and the site renders correctly.

Anyone here in the community have any ideas for fixing these warnings?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [December 2, 2022, 5:36pm UTC](https://community.hubspot.com/t/trying-to-fix-warnings-caused-by-include-import-inside-global-partial/70410/2 "2022-12-02T17:36:05Z")

</div>

Hi, @tw-martijn 👋 Thanks for reaching out. Let’s see if we can get the conversation going — hey @Gonzalo @Sjardo @tjoyce, do you have any suggestions or troubleshooting tips for @tw-martijn?

Best,

Jaycee
