Repository navigation
Report core font health in the System Report and Site Health - #2010
Merged
Merged
Conversation
Contributor
|
Coverage report for commit: 50ee553 Summary - Lines: 93.99% | Methods: 90.96% | Branches: 85.58%
🤖 Jest coverage report |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
|
Coverage report for commit: 50ee553 Summary - Lines: 90.24% | Methods: 95.88%
🤖 PHPUnit coverage report |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 of 6 tasks
gravitypdf-bot
force-pushed
the
feature/font-health-reporting
branch
from
November 6, 2026 00:34
3adbb21 to
a631b60
Compare
gravitypdf-bot
changed the base branch from
feature/core-font-upgrade-prune
to
feature/font-file-conflict-rename
November 6, 2026 00:35
gravitypdf-bot
force-pushed
the
feature/font-health-reporting
branch
from
November 6, 2026 01:56
a631b60 to
1dd5d2c
Compare
jakejackson1
force-pushed
the
feature/font-file-conflict-rename
branch
from
November 6, 2026 03:06
f7acf3e to
74c3b06
Compare
gravitypdf-bot
force-pushed
the
feature/font-file-conflict-rename
branch
from
November 9, 2026 05:30
74c3b06 to
1ad0a3c
Compare
gravitypdf-bot
force-pushed
the
feature/font-file-conflict-rename
branch
2 times, most recently
from
November 9, 2026 06:09
62cbe50 to
38e02af
Compare
Base automatically changed from
feature/font-file-conflict-rename
to
development
November 9, 2026 06:12
gravitypdf-bot
force-pushed
the
feature/font-health-reporting
branch
7 times, most recently
from
November 10, 2026 04:13
5409f02 to
77d1bef
Compare
A font that gave up after its retry showed only in the admin notice, which can be dismissed for good, and a site with
downloads turned off read as broken in the System Report ("0 of 4 required files installed").
The System Report gains two rows. "Core Fonts failed" lists the files that gave up, whatever the notice's dismissals
say. "Core Font downloads" reads the constant, then asks the filter about every manifest file, so it doesn't depend on
what happens to be missing.
A give-up is forgotten once its file is on disk, so the admin notice and the "Core Fonts failed" row don't go on listing
a font copied in by hand. Downloads and retries already cleared the record, but give-ups are skipped by the sync.
The Site Health test gravity_pdf_core_fonts is critical when a missing required file gave up, as someone has to act and
PDFs can lose text to the fallback font, and recommended when downloads were only turned off, which was a choice. It
names the files and the cause, and clears itself once the fonts are on disk. A file counts as present by Model_Font_Sources::is_installed(), the same check as the installed
counts, so one another font's file holds the name of is missing until its hashed copy is saved.
Direct Site Health tests block the page, so the form scan behind the missing files only runs when a file has given up
or the constant or filter could block a download.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gravitypdf-bot
force-pushed
the
feature/font-health-reporting
branch
from
November 10, 2026 04:19
14c082f to
50ee553
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A font that gave up after its retry showed only in the admin notice, which can be dismissed for good, and a site with core font downloads turned off read as broken ("0 of 4 required files installed"). This adds two System Report rows and a Site Health test so both show up for support, and the failure reports clear themselves once the fonts are on disk.
None. Dismissing the notice doesn't hide them.On,Off (GPDF_AUTO_INSTALL_FONTS constant), orOff/Partly off (gfpdf_auto_install_fonts filter).gravity_pdf_core_fonts, for users withgravityforms_view_settings. It iscriticalwhen a missing required file gave up andrecommendedwhen downloads are only turned off, and names the files and the cause.good.Try it
Add this to an mu-plugin on a wp-env site and pick a core font (e.g. Free Serif) as the default font:
Off (gfpdf_auto_install_fonts filter)and "Core Fonts failed" readsNone.WP_Errorfrompre_http_request, save the settings, and run cron twice past the retry. "Core Fonts failed" lists the files with their dates, and still does after you dismiss the admin notice. If the font is one the site requires, Site Health lists "Gravity PDF could not download required fonts" as critical.wp-content/uploads/PDF_EXTENDED_TEMPLATES/fonts/by hand and reload. It no longer appears in "Core Fonts failed" or the admin notice.Test plan
test_an_unwritable_folder_fails_without_a_requestx2 (the container runs as root) andtest_the_kill_switch_constant_turns_downloads_off(a shim warning)More info
Model_Font_Downloadergains publicget_auto_install_status(),get_auto_install_blocker( array $missing ): ?stringandis_auto_install_overridden(), andModel_Required_Fontsgains publicget_missing_files(), all@since 6.19.0.can_download_all(), so Site Health and the downloader can't disagree. It isnullwhen nothing missing is blocked, which includes an empty list.get_auto_install_status()asks about every file on the manifest, so a site that blocks every download never readsOnjust because nothing is missing. That also keeps the row stable in the E2E screenshot, where other specs' forms decide what is required. With a callback hooked, the filter runs once per manifest file, only when the report is built. With none it returnsOnwithout the walk.Model_System_Report::get_core_font_health()skips that scan unless a file has given up oris_auto_install_overridden()says a download could be blocked, as the result isgoodotherwise. A site with anygfpdf_auto_install_fontscallback still scans.get_missing_files()asksModel_Font_Sources::is_installed(), the same check as the "Core Fonts installed" counts, so a required font that another font's file holds the name of counts as missing until its hashed copy is saved.get_failed_files(), including on a subsite, where it lists the main network's record.Model_Font_Downloader::get_failures()deletes a give-up and its back-off whenis_installed()finds the file, once per request and only for files that gave up. If the font goes missing again it starts over with a new retry.is_installed()compares size only, so another font's file of exactly the right size counts as installed.Model_System_Reportgains an optional trailing?Model_Font_Downloader $font_downloader = nullconstructor argument, which falls back to the registered downloader.Model_Font_Sources::get_manifest()now builds its copy with the hashed names once, and rebuilds it only when the collisions change, rather than copying on every read. It compares the collisions becauseget_known_builds()calls it while they are part built.View_Actions, which the Site Health test reads, so a copy edit is made in one place. The same goes for the bulleted font list,View_Actions::get_code_list().label_export, so its text is unchanged.https://docs.gravitypdf.com/developers/filters/gfpdf_auto_install_fonts/) needs a matching docs page.