Problem with phone link

Hi everybody,

I have a small problem with my phone link in footer, i hope somebody could help me!

In this blog you can see in the top-right part of the footer the button “llamamos” that contains a phone number.

When I’ve inserted it in the beginning it used to work properly. Now, on the contrary, the link appears this way: https://blog.illy.com/es-es/+34933034050
That of course is not correct and send the use to the 404 error page.

In the editor it had been inserted like in the screenshot attached so it should be a phone link.

Do somebody have an idea of what the problem could be?

Thanks a lot everybody!

Hey @EricaFontimedia

It seems like there might be an issue with how the phone number link is formatted in the footer of the blog. The link appears to be incorrect.

The link format should be “tel:+34933034050” to properly initiate a phone call when clicked.

Check the HTML code in the editor to ensure that the phone number link is correctly formatted with the “tel:” prefix.

By updating the link to “tel:+34933034050”, it should direct users to call the phone number instead of leading to an error page.

Make sure to save the changes and test the link to verify that it now functions correctly for users.

Hi Shubham_Sharma,

thank you for your reply!

I’ve found this code that is part of the module:

{% for item in module.contact_button %}
<div class=“illy-footer-contact-button”>
{% set href = item.contact_link.url.href %}
{% if item.contact_link.url.type is equalto “EMAIL_ADDRESS” %}
{% set href = “mailto:” + href %}
{% endif %}
<a href=“{{ href }}”
{% if item.contact_link.open_in_new_tab %}target=“_blank”{% endif %}
{% if item.contact_link.rel %}rel=“{{ item.contact_link.rel }}”{% endif %}
>
<h3> {{ item.contact_text }}</h3>
</a>
</div>
{% endfor %}

And the file attached is what appears in the sidebar.

Do you see any error?

Could somebody give me some help to solve it?

Hey @EricaFontimedia,
I also ran into this issue. Thank you for providing the code in the module. Not sure if you already solved this issue; but it looks like there is an issue with hubspot not formatting the phone number correctly when you choose the phone number as a link type.
Essentially, I had to write an extra conditional inside the link field snippet to account for phone_number types. I tried to just use an external link type and just placing a tel:1234567890 for testing; but hubspot assign the link. I believe this is a hubspot bug. I’ve pasted the code below and bolded the conditional:
{% if item.add_button %}
{% set href = item.link.url.href %}
{% if item.link.url.type is equalto “EMAIL_ADDRESS” %}
{% set href = “mailto:” + href %}
{% endif %}
<a class=“button button--{{ item.button_style }}”
{{ item.link.url.type }}
{% if item.link.url.type is equalto “CALL_TO_ACTION” %}
href=“{{ href }}” {# The href here is not escaped as it is not editable and functions as a JavaScript call to the associated CTA #}
{% elif item.link.url.type is equalto “PHONE_NUMBER” %}
href=“tel:{{ href }}”
{% else %}
href=“{{ href|escape_url }}”
{% endif %}
{% if item.link.open_in_new_tab %}
target=“_blank”
{% endif %}
{% if item.link.rel %}
rel=“{{ item.link.rel|escape_attr }}”
{% endif %}
>
{{ item.button_label }}
</a>
{% endif %}

Hope this helps!

Thank tou, in the mean team I’ve deactivated the section with the phone link, if I’ll decide to activate it again I’ll try your suggestion!