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

gfontsWeblist.json not always correctly populated #17

Open
JohnRDOrazio opened this issue Feb 21, 2024 · 5 comments
Open

gfontsWeblist.json not always correctly populated #17

JohnRDOrazio opened this issue Feb 21, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@JohnRDOrazio
Copy link
Member

In recent tests I came across a situation where the font picker in the Block editor was not showing Google Fonts, and since the last chosen font had been a Google Font, the font picker was not able to find the current value in the list and the picker was showing as empty.

Upon inspecting network requests, I saw that there was an error when loading the gfonts_preview/gfontsWeblist.json file.

Upon inspecting such file, I found it to contain an empty object: {}.

Upon force refreshing the Google Fonts previews from the BibleGet admin settings page, it was correctly populated. The strange thing is, I had just recently force refreshed the Google Fonts previews.

In conclusion, we need further investigation as to why the contents of this file are not always getting correctly written...

@JohnRDOrazio JohnRDOrazio added the bug Something isn't working label Feb 21, 2024
@JohnRDOrazio
Copy link
Member Author

there should probably also be a default fallback list of Google Fonts for when the API key is not provided, like we do for the Customizer component...

@JohnRDOrazio
Copy link
Member Author

I'm seeing that when a key that was previously added is removed and then re-added, the the Google Fonts previews have been removed but are not re-created when key is re-added.

@JohnRDOrazio
Copy link
Member Author

there should probably also be a default fallback list of Google Fonts for when the API key is not provided, like we do for the Customizer component...

fixed in commit e7a8c11

@JohnRDOrazio
Copy link
Member Author

I'm wondering if maybe the gfonts_preview folder is overwritten during plugin update? But if that were the case, wouldn't it just disappear completely rather than contain gfontsWeblist.json with an empty object {}?

@JohnRDOrazio
Copy link
Member Author

I'm wondering if maybe the gfonts_preview folder is overwritten during plugin update? But if that were the case, wouldn't it just disappear completely rather than contain gfontsWeblist.json with an empty object {}?

I can confirm that the folders to disappear completely when the plugin is updated. Perhaps we need a background worker to populate them again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant