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

Issue-1026: Prevent Errors When Using VideoPress Videos #1223

Merged
merged 2 commits into from
Feb 28, 2025

Conversation

kevinfodness
Copy link
Member

@kevinfodness kevinfodness commented Feb 27, 2025

Summary

Fixes #1026

This pull request addresses the issue with VideoPress embedded videos causing a FAILED_TO_PARSE_IMAGE error when publishing to Apple News. The fix involves removing the is_embed_figure check from the image parser and removing the associated function entirely, as it is incorrectly used and not appropriate for images.

Changes Made

  • Removed is_embed_figure check from the image parser.
  • Deleted the is_embed_figure function, as it was only used in one incorrect instance.

Steps to Test

  1. Embed a video using VideoPress in WordPress.
  2. Publish to Apple News.
  3. Confirm that the FAILED_TO_PARSE_IMAGE error no longer occurs.

Additional Notes

Because of how VideoPress works, it's not straightforward to implement first-class support for the videos (Apple News requires a Video component and a direct link to an MP4 file to play, whereas VideoPress relies on JavaScript and iframes to play videos). The goal for this PR is to stop getting component errors on the image component when a VideoPress embed is encountered.

@kevinfodness kevinfodness added bug Something isn't working php Requires understanding PHP enhancement New feature or request labels Feb 27, 2025
@kevinfodness kevinfodness changed the title Issue-1026: WordPress' New Video Press Issue-1026: Prevent Errors When Using VideoPress Videos Feb 28, 2025
@kevinfodness kevinfodness marked this pull request as ready for review February 28, 2025 15:28
Copy link

@cahdeemer cahdeemer left a comment

Choose a reason for hiding this comment

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

🎉

@kevinfodness kevinfodness merged commit 2bbf263 into develop Feb 28, 2025
14 checks passed
@kevinfodness kevinfodness deleted the fix/issue-1026/videopress-embed-image-parser branch February 28, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request php Requires understanding PHP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WordPress' New Video Press
2 participants