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

ensure blocks are present before processing #173

Merged
merged 4 commits into from Feb 6, 2024

Conversation

psorensen
Copy link
Contributor

@psorensen psorensen commented Feb 5, 2024

Description of the Change

Closes #

How to test the Change

  1. Set safe_svg_optimizer_enabled filter to return true
    add_filter( 'safe_svg_optimizer_enabled', '__return_true' );
  2. Create a new Page, populate the page title and featured image. Do not populate any blocks.
  3. Publish the post.
  4. Page should publish without normally without issue.

Changelog Entry

Fixed fatal JS error when optimization is enabled and page is published without blocks.

Credits

Props @tictag @psorensen

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@psorensen psorensen marked this pull request as draft February 6, 2024 00:41
@jeffpaul jeffpaul added this to the 2.3.0 milestone Feb 6, 2024
assets/js/admin/admin.js Outdated Show resolved Hide resolved
@dkotter dkotter marked this pull request as ready for review February 6, 2024 17:52
@dkotter dkotter merged commit bc674d9 into develop Feb 6, 2024
11 checks passed
@dkotter dkotter deleted the empty-page-optimization-bug branch February 6, 2024 17:52
@coreyworrell
Copy link

Any estimate when this will be released? Having to constantly enable/disable the plugin or comment out the filter when editing content is becoming a hassle. Thanks very much.

@psorensen
Copy link
Contributor Author

@coreyworrell Hard to provide timing, but it might be worth checking out the 2.3.0 milestone https://github.com/10up/safe-svg/milestone/10 to see the list of open tasks the next release is dependent on.

Additionally, you can use the develop branch of this repo to access the latest features/fixes.

@dkotter
Copy link
Collaborator

dkotter commented Mar 18, 2024

@coreyworrell Hoping to get the next release finalized and out this week

@dkotter dkotter modified the milestones: 2.3.0, 2.2.3 Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When svg optimization is turned on, a javascript error can occur that breaks saving content
4 participants