Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Font Awesome not working after deploying events portal

(0) ShareShare
ReportReport
Posted on by 193

Hi,

I am currently customizing the events portal locally. I downloaded the sample events website and I am serving it locally to change some code. Font Awesome styles and icons are shown properly when serving the app locally (localhost) :pastedimage1576057815957v1.png(button on localhost).

However, once I use the script DeployToDynamcis365Instance.ps1 to deploy the code on the live portal, the icons and styles are not loading on the live portal pastedimage1576057908098v2.png(same button on live portal).

What can I do please?

Thank you.

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Font Awesome not working after deploying events portal

    Hi Kelly,

    Have you tried to create the folder and copy font files into it manually?

    Regards,

    Clofly

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Font Awesome not working after deploying events portal

    Hi kelly,

    I have found that the script may upload files in dist/portal-hosted folder to portal:

    $websitePatch is event website root path, and there is an existing Localization folder with translation files in downloaded sample files.

    However, there is no dist/portal-hosted folder by default,

    I thought it could be that due there is no such folder and no related files(from fontawesome-webfont.eot to style.css),

    thus you didn't find font-awesome libraries in portal.

    pastedimage1576159950357v1.png

    I suggest you could try create the folder manually and copy all font-awesome files in rootpath/node_modules/font-awesome/fonts to the folder.

    pastedimage1576160389340v2.png

    Then run deployment script again to test whether font-awesome files could be uploaded to Portal.(in Web file entity)

    Regards,

    Clofly

  • kelly1 Profile Picture
    kelly1 193 on at
    RE: Font Awesome not working after deploying events portal

    Thanks for your reply. I followed the tutorial however the font-awesome libraries still weren't included. Now I included a tag to refer to the the font awesome library online.

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Font Awesome not working after deploying events portal

    Hi Kelly,

    Please do following checks:

    1. Have you followed the tutorial about how to build and portal-host event website locally and deploy it to crm?

    https://docs.microsoft.com/en-us/dynamics365/marketing/developer/portal-hosted

    As it states that: Duplicate the environment.d365.ts configuration file located in the \src\environments folder and name it as environment.ts.

    There are 2 ts files in the folder, we should copy the correct one based on event website type.

    21. Open F12 developer tool, and check whether you icon class name has been replaced by your customized icon name,(mine is fa-camera)

    and whether fontAwesome attribute is available for the font element.

    pastedimage1576139906050v1.png

    2.2 Also, expand the font element and click ::before, check whether font-content is in right format.

    pastedimage1576140533691v2.png

    3. Check whether fontawesome-webfont files(eot, svg, ttf, woff, woff2) exist in web file entity records.

    https://docs.microsoft.com/en-us/dynamics365/marketing/developer/portal-hosted#manual-deployment

    Regards,

    Clofly

  • Suggested answer
    RidvanShaikh Profile Picture
    RidvanShaikh 50 on at
    RE: Font Awesome not working after deploying events portal

    Yes, you uploaded the files as a Notes on Dynamics portal web files and Must select Parent page as Home for all files. So all uploaded files will be available on <PORTAL PATH> / <YOUR FILENAME>.

  • kelly1 Profile Picture
    kelly1 193 on at
    RE: Font Awesome not working after deploying events portal

    Should I upload the files as notes on Dynamics Portal Web Files? I don't think that would work cause the folder structure will be lost and hence the paths won't be correct.

  • Suggested answer
    RidvanShaikh Profile Picture
    RidvanShaikh 50 on at
    RE: Font Awesome not working after deploying events portal

    You can download these files from FontAwsome website i mentioned in above comment.

    You need to upload all these files on your portal.

  • kelly1 Profile Picture
    kelly1 193 on at
    RE: Font Awesome not working after deploying events portal

    Where should I upload these? And which files please?

  • Suggested answer
    RidvanShaikh Profile Picture
    RidvanShaikh 50 on at
    RE: Font Awesome not working after deploying events portal

    You need to upload all the files (of Font Awesome) on portal with same path.

    You can download all the files from Font Awesome websites as below:

    fontawesome.com/.../hosting-font-awesome-yourself

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans