Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fonts fail to load on www subdomain (resolves #2006) #2063

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

jobara
Copy link
Collaborator

@jobara jobara commented Dec 11, 2023

Resolves #2006

The fonts.css file is generated when php artisan google-fonts:fetch is called. It is configured to use the public disc which had been setup to include the APP_URL to generate an absolute URL to the resource. However, because this is configured to be the URL without the sub domain, it produces the wrong URL when the www subdomain is used. To resolve the issue, a URL relative to the root is used instead.

This can be tested locally by adding the www subdomain in front. For example if configured to run on platform.test you can use www.platform.test. This works with Herd at least, so may depend on your local setup.

Prerequisites

If this PR changes PHP code or dependencies:

  • I've run composer format and fixed any code formatting issues.
  • I've run composer analyze and addressed any static analysis issues.
  • I've run php artisan test and ensured that all tests pass.
  • I've run composer localize to update localization source files and committed any changes.

If this PR changes CSS or JavaScript code or dependencies:

  • I've run npm run lint and fixed any linting issues.
  • I've run npm run build and ensured that CSS and JavaScript assets can be compiled.

@jobara jobara added this to the 1.2.5 milestone Dec 11, 2023
@jobara jobara requested a review from greatislander December 11, 2023 17:20
@jobara
Copy link
Collaborator Author

jobara commented Dec 11, 2023

@greatislander could you please review this? I made a change to the public disc, so would like to make sure nothing else will be negatively affected.

@jobara jobara enabled auto-merge (squash) December 11, 2023 17:22
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ccaa90c) 97.63% compared to head (9e3a81e) 97.63%.
Report is 1 commits behind head on dev.

❗ Current head 9e3a81e differs from pull request most recent head 81dca9a. Consider uploading reports for the commit 81dca9a to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##                dev    #2063   +/-   ##
=========================================
  Coverage     97.63%   97.63%           
  Complexity     2105     2105           
=========================================
  Files           314      314           
  Lines          9497     9497           
=========================================
  Hits           9272     9272           
  Misses          225      225           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@greatislander greatislander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! ✅

@jobara jobara merged commit 290a2b2 into accessibility-exchange:dev Dec 12, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Fonts fail to load on www subdomain of production site
2 participants