CMS Development

JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

Hi, I am editing the footer partial for our site to update the copyright date, when I update this, the module breaks the footer.  The social icons get replaced with un-styled versions and content of the address icons section. Any ideas where I should start to troubleshoot something like this? Any help is greatly appreciated. 
Thanks,
Jim

0 Upvotes
1 Accepted solution
BarryGrennan
Solution
Top Contributor

Updating Text breaks global module?

SOLVE

Oh, 

 

You've got two modules name "footer_block1", that's why it's duplicating. Rename the second one "footer_block2"


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

 

 

View solution in original post

0 Upvotes
17 Replies 17
BarryGrennan
Solution
Top Contributor

Updating Text breaks global module?

SOLVE

Oh, 

 

You've got two modules name "footer_block1", that's why it's duplicating. Rename the second one "footer_block2"


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

 

 

0 Upvotes
JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

Thanks so much! I am not sure how or who could have done that. We never updated that, but I'm grateful for your help and for catching that!

 

0 Upvotes
BarryGrennan
Top Contributor

Updating Text breaks global module?

SOLVE

No worries!

 

I imagine if the default text was built right into the template, that's what would show up on your live site. It's only when it comes time to actually edit the content that things go haywire because you're overwriting what's in the template and the new data is stored based on the module name, so duplicate module names will mean duplicate content.

 


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

 

 

0 Upvotes
BarryGrennan
Top Contributor

Updating Text breaks global module?

SOLVE

Hi @JLangman 

 

Can you show us some code? Let's start with that footer partial

 


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

 

 

0 Upvotes
JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

Hi Barry, I must be trying to post the code the wrong way... I keep doing so and my post goes away when I hit reply. I'll try to do so after this replay. 

0 Upvotes
JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

so weird, I paste the code in the code snippet but it won't take it. I can't win today.

0 Upvotes
BarryGrennan
Top Contributor

Updating Text breaks global module?

SOLVE

@JLangman  On the editor for replying click the three dots at the top right, when that opens up, click on the </> symbol and paste your code in there.

 


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

 

 

0 Upvotes
JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

Best I can do is a codepen... https://codepen.io/jlangman/pen/vYrWVLa

0 Upvotes
BarryGrennan
Top Contributor

Updating Text breaks global module?

SOLVE

And what's the edit you're trying to make?


profile2022aBarry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

 

 

0 Upvotes
JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

Hi Barry,

So when I open this file in the design manager it offers a global editor to make edited. When I click on it and update the rich text for the copyright dayr, I am only trying to change a single digit in the text editer, and when I publish it it breaks the social icons, they go away and are replaced with a dupe of the address icons and info thats huge and not styled. It's so weird. I have no idea why its breaking or where to start to trouble shoot something like this.

0 Upvotes
JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

I got it! switched to safari... so crazy.

0 Upvotes
JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

and itsgone!

0 Upvotes
JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

Hi Barry, yes that's what I have been doing... it rejects it... so weird!

 

0 Upvotes
JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

It tells me:

Correct the highlighted errors and try again.

  • We were unable to post your content. Please wait a few minutes and try again."
0 Upvotes
JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

Hi Barry, thanks for checking in. Here's the code in the partial...

<!--
templateType: global_partial
label: Page Footer
-->
<footer class="footer">
  <div class="footer-top">
    <div class="footer-inner">

      <div class="footer_col_1">
        <div class="footer_col_inner">
          <div class="footer-logo">
            {% set logo_file = get_asset_url('../../images/sync-creative-advertising-agency-grey.png') %}
            {% module "footer_logo" path="@hubspot/logo", label="Footer Logo", link="/", img={src="{{logo_file}}", alt="SyncCreative", override_inherited_src=true} %}
          </div>
          <div class="footer-contact">
            {% module_block module "footer_block1" path="@hubspot/rich_text" , label="Contact Us" %}
            {% module_attribute "html" %}
            <a href="tel:614-586-1671" target="_top">
              <i>
                <svg class="mk-svg-icon" data-name="mk-moon-phone-2" data-cacheid="icon-5f76fe004b27b" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M352 320c32-32 128 64 128 96s-96 96-96 96c-64 0-193.75-65.75-256-128s-128-192-128-256c0 0 64-96 96-96s128 96 96 128-64 32-64 64 32 64 64 96 64 64 96 64 32-32 64-64zm-32-192c-22.419 0-42.133 11.536-53.563 28.987 7.893-3.206 16.518-4.987 25.563-4.987 37.556 0 68 30.445 68 68 0 9.045-1.781 17.669-4.987 25.563 17.451-11.43 28.987-31.144 28.987-53.563 0-35.346-28.653-64-64-64zm16-64c-33.896 0-64.273 15.059-84.812 38.85 16.792-9.452 36.17-14.85 56.812-14.85 64.064 0 116 51.935 116 116 0 20.642-5.398 40.02-14.85 56.812 23.791-20.539 38.85-50.916 38.85-84.812 0-61.856-50.145-112-112-112zm32-64c-41.519 0-78.926 17.578-105.206 45.689 22.477-13.772 48.913-21.717 77.206-21.717 81.738 0 148 66.269 148 148.014 0 28.326-7.962 54.79-21.761 77.286 28.154-26.283 45.761-63.718 45.761-105.272 0-79.529-64.471-144-144-144z"></path></svg>
              </i>
              (614) 586-1671
            </a>
            <br>
            <a href="mailto:hello@synccreative.com" target="_top">
              <i>
                <svg class="mk-svg-icon" data-name="mk-moon-mail-2" data-cacheid="icon-5f76fe004b7cc" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M426.671 0h-341.328c-46.937 0-85.343 38.405-85.343 85.345v341.311c0 46.969 38.406 85.344 85.343 85.344h341.328c46.938 0 85.329-38.375 85.329-85.345v-341.31c0-46.94-38.391-85.345-85.329-85.345zm0 64c3.994 0 7.773 1.167 11.01 3.171l-181.681 150.202-181.677-150.2c3.239-2.005 7.022-3.173 11.02-3.173h341.328zm-341.328 384c-.962 0-1.91-.073-2.842-.204l112.813-156.483-14.628-14.627-116.686 116.685v-305.569l192 232.198 192-232.197v305.568l-116.686-116.685-14.627 14.627 112.814 156.484c-.929.13-1.873.203-2.831.203h-341.327z"></path></svg>
              </i>
              hello@synccreative.com
            </a>
            <br>
            <a href="https://goo.gl/maps/5jw6TZoBhWQ2" target="_new">
              <i>
                <svg class="mk-svg-icon" data-name="mk-moon-location-5" data-cacheid="icon-5f76fe004bd5a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 0c-106.039 0-192 85.961-192 192 0 192 192 320 192 320s192-128 192-320c0-106.039-85.961-192-192-192zm0 224c-35.346 0-64-28.654-64-64s28.654-64 64-64c35.347 0 64 28.654 64 64s-28.653 64-64 64z"></path></svg>
              </i>
              243 E Livingston Ave <br> <img src="{{ get_asset_url('../../images/spacer.png') }}" alt="Spacer">Columbus, OH 43215
            </a>
            {% end_module_attribute %}
            {% end_module_block %}
          </div>
        </div>
      </div>

      <div class="footer_col_2">
        <div class="footer-menu">
          {% menu "Footer_menu" , id="35624737868" , label="Footer Menu" %}
        </div>
        <div class="social-links">
          <div class="social-link-inner">
            {% module_block module "footer_block1" path="@hubspot/rich_text" %}
            {% module_attribute "html" %}
            <ul>
              <li>
                <a href="https://www.facebook.com/SyncCreative/" target="_blank" >
                  <svg class="mk-svg-icon" data-name="mk-jupiter-icon-square-facebook" data-cacheid="icon-5f76fe004d81e" style=" height:32px; width: 32px; " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M444-6.4h-376c-37.555 0-68 30.445-68 68v376c0 37.555 30.445 68 68 68h376c37.555 0 68-30.445 68-68v-376c0-37.555-30.445-68-68-68zm-123.943 159.299h-49.041c-7.42 0-14.918 7.452-14.918 12.99v19.487h63.723c-2.081 28.41-6.407 64.679-6.407 64.679h-57.565v159.545h-63.929v-159.545h-32.756v-64.474h32.756v-33.53c0-8.098-1.706-62.336 70.46-62.336h57.678v63.183z"></path></svg>
                </a>
              </li>

              <li>
                <a href="https://twitter.com/synccreative" target="_blank" >
                  <svg class="mk-svg-icon" data-name="mk-jupiter-icon-square-twitter" data-cacheid="icon-5f76fe004d8e1" style=" height:32px; width: 32px; " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M444-6.4h-376c-37.555 0-68 30.445-68 68v376c0 37.555 30.445 68 68 68h376c37.555 0 68-30.445 68-68v-376c0-37.555-30.445-68-68-68zm-41.733 263.6c-31.342 122.024-241.534 173.781-338.231 47.108 37.04 33.978 101.537 36.954 142.439-3.669-23.987 3.373-41.436-19.233-11.968-31.465-26.501 2.808-41.236-10.76-47.279-22.26 6.213-6.255 13.068-9.157 26.322-9.998-29.017-6.581-39.719-20.227-43.011-36.776 8.059-1.844 18.135-3.436 23.637-2.724-25.411-12.772-34.247-31.98-32.848-46.422 45.402 16.202 74.336 29.216 98.534 41.7 8.619 4.41 18.237 12.38 29.084 22.471 13.825-35.095 30.888-71.268 60.12-89.215-.493 4.07-2.757 7.856-5.76 10.956 8.291-7.239 19.06-12.218 30.004-13.656-1.255 7.896-13.094 12.341-20.233 14.927 5.41-1.621 34.18-13.957 37.317-6.932 3.702 8-19.851 11.669-23.853 13.058-2.983.965-5.986 2.023-8.928 3.17 36.463-3.49 71.26 25.413 81.423 61.295.721 2.581 1.44 5.448 2.099 8.454 13.331 4.782 37.492-.222 45.279-4.825-5.626 12.792-20.253 22.21-41.833 23.93 10.399 4.154 29.994 6.427 43.51 4.222-8.558 8.83-22.363 16.836-45.823 16.648z"></path></svg>
                </a>
              </li>

              <li>
                <a target="_blank" href="https://www.linkedin.com/company/sync-creative">
                  <svg class="mk-svg-icon" data-name="mk-jupiter-icon-square-linkedin" data-cacheid="icon-5f76fe004d9a5" style=" height:32px; width: 32px; " xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M444-6.4h-376c-37.555 0-68 30.445-68 68v376c0 37.555 30.445 68 68 68h376c37.555 0 68-30.445 68-68v-376c0-37.555-30.445-68-68-68zm-284.612 95.448c19.722 0 31.845 13.952 32.215 32.284 0 17.943-12.492 32.311-32.592 32.311h-.389c-19.308 0-31.842-14.368-31.842-32.311 0-18.332 12.897-32.284 32.609-32.284zm32.685 288.552h-64.073v-192h64.073v192zm223.927-.089h-63.77v-97.087c0-27.506-11.119-46.257-34.797-46.257-18.092 0-22.348 12.656-27.075 24.868-1.724 4.382-2.165 10.468-2.165 16.583v101.892h-64.193s.881-173.01 0-192.221h57.693v.31h6.469v19.407c9.562-12.087 25.015-24.527 52.495-24.527 43.069 0 75.344 29.25 75.344 92.077v104.954z"></path></svg>
                </a>
              </li>
            </ul>
            {% end_module_attribute %}
            {% end_module_block %}
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="footer-bottom">
    <div class="footer-inner">
      <div class="footer__copyright">
        {% module_block module "footer_copyright_text" path="@hubspot/text" , label="Copyright" %}
        {% module_attribute "value" %}
        <p>© 2020 Sync Creative. | Crafted with Pride in <img src="{{ get_asset_url('../../images/ohio-state-2.png')}}" alt="Sync | Built in Ohio"> Columbus, Ohio.</p>
        {% end_module_attribute %}
        {% end_module_block %}
      </div>
    </div>
  </div>
</footer>

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Updating Text breaks global module?

SOLVE

Hi, @JLangman 👋 Thanks for reaching out! Hey, @BarryGrennan @Sjardo, do you have any tips you can share with @JLangman?

 

Thank you!  — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

JLangman
Participant | Partner
Participant | Partner

Updating Text breaks global module?

SOLVE

Hi and thanks for checking in Jaycee!