Skip to content

VideoPress: list playlists in the All Playlists block on WordPress.com - #54065

Merged
heydemoura merged 1 commit into
trunkfrom
fix/videopress-all-playlists-empty-state
Oct 24, 2026
Merged

heydemoura merged 1 commit into
trunkfrom
fix/videopress-all-playlists-empty-state

Conversation

@heydemoura

Copy link
Copy Markdown
Contributor

Proposed changes

  • Bug: on WordPress.com (Simple) sites the All Playlists block always shows its "No playlists yet" empty state, even when published posts contain Video Playlist blocks.
  • Cause: the block lists the videopress_playlist_index option, which Playlist_Index keeps current from wp_after_insert_post / deleted_post, plus a one-off full scan scheduled on admin_init. Those hooks are only added by the package's Initializer::active_initialization(). WordPress.com does not run the package initializer, so nothing ever writes the index there and the block reads an empty option. The extended-block file already starts Channel::init() for the same reason, but not the index.
  • Fix: register_videopress_blocks() now also starts Playlist_Index::init() once the Video Playlist block is registered, so the index is kept wherever the block exists. Where the package initializer already ran (self-hosted and Atomic sites with the VideoPress module active), hooking it again is a no-op: the callbacks are identical, so WordPress keeps one.
  • Existing sites: they get the full scan on their next admin_init (the index version option is missing), and any post save re-indexes that post.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No.

Testing instructions

  • jetpack docker phpunit jetpack -- --filter=VideoPress_Video_Extension_Test: the playlist index follows saved posts when the playlist block is registered, and is not hooked when it is not.
  • On a WordPress.com Simple site with this change (sandbox):
    1. Publish a post with a Video Playlist block that has a title and some videos.
    2. Open a page with an All Playlists block: the playlist is listed instead of "No playlists yet".
    3. For a site that already had playlists before the fix, visit wp-admin once (it schedules the full scan), let cron run, and reload the page: the existing playlists are listed.

🤖 Generated with Claude Code

… lists playlists

The All Playlists block reads the playlist index, which only the package
initializer hooks into post saves. WordPress.com does not run that
initializer, so the index was never written there and the block always
showed its empty state. Start the index from the extended-block
registration once the Video Playlist block is registered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@heydemoura heydemoura added [Feature] VideoPress A feature to help you upload and insert videos on your site. [Type] Bug labels Oct 23, 2026
@heydemoura heydemoura self-assigned this Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the fix/videopress-all-playlists-empty-state branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/videopress-all-playlists-empty-state

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2
@github-actions github-actions Bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] In Progress [Tests] Includes Tests labels Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Jetpack plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Oct 23, 2026
@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/plugins/jetpack/extensions/extended-blocks/videopress-video/videopress-video.php 12/33 (36.36%) -3.64% 3 ❤️‍🩹

Full summary · PHP report · JS report

@heydemoura
heydemoura marked this pull request as ready for review October 23, 2026 19:05
@heydemoura
heydemoura merged commit ec96d4e into trunk Oct 24, 2026
96 of 97 checks passed
@heydemoura
heydemoura deleted the fix/videopress-all-playlists-empty-state branch October 24, 2026 13:21
@github-actions github-actions Bot added this to the jetpack/16.4 milestone Oct 24, 2026
@github-actions github-actions Bot removed [Status] In Progress [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] VideoPress A feature to help you upload and insert videos on your site. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Tests] Includes Tests [Type] Bug

1 participant