Issue with Social Share module and twitter vs X

Within a module I have this social sharing code that utilizes Hubspots Social icons.

I was asked to update the module last month to account for Twitter being X now and found that there was no Hubspot Icon for it. However having x-twitter in the place of twitter in the module below still showed the Twitter icon on the page. My Hope was when the icon got updated, I didn’t have to go back into code to update it there again. Guess I did. LOL.

Yesterday this stopped working and now I am back on twitter as a variable. Does anyone know if there was a change in the backend of the system? Anyone know if there is an ETA? It sounds like we are waiting on X to do some proper branding according to this forum post:

https://community.hubspot.com/t5/Email-Marketing-Tool/Replacing-Twitter-icon-with-new-X-icon-in-email-footers/m-p/882669/highlight/true

{# Social sharing #}

<div class=“social-sharing” >

{% if module.share_text %}
<h4 class=“social-sharing__share-text” style=“text-align: {{ module.alignment}};”>{{ module.share_text }}</h4>
{% endif %}

{# Loops through icons in the repeater #}

{% for social_link in module.social_links %}

{# Sets href attribute used for the link field #}

{% set social_icon = social_link.social_account %}
{% if social_icon == “facebook-f” %}
{% set href = “http://www.facebook.com/share.php?u={{ content.absolute_url }}” %}
{% elif social_icon == “twitter” %}
{% set href = “https://twitter.com/intent/tweet?url={{ content.absolute_url }}” %}
{% elif social_icon == “linkedin-in” %}
{% set href = “LinkedIn Login, Sign in | LinkedIn{{ content.absolute_url }}” %}
{% elif social_icon == “pinterest-p” %}
{% set href = “Pinterest{{ content.absolute_url }}” %}
{% elif social_icon == “envelope” %}
{% set href = “mailto:?body={{ content.absolute_url }}” %}
{% endif %}

{# Social sharing icon and link #}

<a class=“social-sharing__link” href=“{{ href }}” target=“_blank” rel=“noopener” title=“{{ social_link.social_account }}”>
<span class=“{{ icon_size }} {{ icon_color }} {{ icon_shape }}”>
{% icon
extra_classes=“social-sharing__icon icon”,
name=“{{ social_icon }}”,
purpose=“semantic”,
style=“SOLID”,
title=“{{ social_link.accessibility_options.title }}”
%}
</span>
</a>

{% endfor %}

Hi, @JohnLaprairie :waving_hand: Thanks for reaching out. I don’t have an update to the comment left by my teammate in the post you linked to. And I’d like to tag some community members into the conversation — hey @Brownstephen101 @Indra @Stephanie-OG, can you share how you’ve been dealing with this issue in your recent projects?

Best,

Jaycee

I did create one module that circumvented this issue by going with custom icons in the code rather than going with the Hubspot icons. I referenced this article mainly plus others:

https://community.hubspot.com/t5/CMS-Development/How-to-make-custom-social-sharing-icons/m-p/485636

The current issue was the client had a request for the X icon and this was the code we had in their templates. I will likely need to request to the client to ok the additional custom code.

Hey @JohnLaprairie CC @Jaycee_Lewis

In my HubSpot theme ( Generator ), I addressed the Twitter/X icon issue by giving my users the option to add their own images for social icons.

Here’s how it looks in the UI: