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 error when exporting theme with no fonts #582

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

pbking
Copy link
Contributor

@pbking pbking commented Apr 23, 2024

When there are no fonts to export an error is thrown (null ref).
This change checks for fonts to copy to the theme zip before trying to.

Found the bug while testing this reported issue.

Fixes #585

To test:

  • Activate Twenty Twenty Four
  • Make a minor change with Global Styles (such as background color) and save Global Styles. (Do not add fonts.)
  • Create a Child Theme (Create Theme > Create Child Theme)
  • The theme should be successfully created.
  • Export the Theme with CBT
  • The theme should be successfully exported.

… change checks for fonts to copy to the theme before trying to.
@pbking pbking added the bug Something isn't working label Apr 23, 2024
@vcanales
Copy link
Member

This looks good, but I haven't been able to reproduce the error following the instructions. Where is the error thrown?

@pbking
Copy link
Contributor Author

pbking commented Apr 23, 2024

It reproduces (for me) when creating a child theme using the steps above.
Edit: Sorry, it happens when I EXPORT said child theme.

@pbking pbking changed the title Fix Child Theme Creation Bug Fix error when exporting theme with no fonts Apr 24, 2024
Copy link
Member

@vcanales vcanales left a comment

Choose a reason for hiding this comment

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

👍

@pbking pbking merged commit 510fc50 into trunk Apr 24, 2024
2 checks passed
@pbking pbking deleted the fix/error-exporting-with-no-fonts branch April 24, 2024 17:36
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
Development

Successfully merging this pull request may close these issues.

Fatal Error at add_activated_fonts_to_zip() when exporting theme to zip; theme export fails
2 participants