Repository navigation
Stats: Give no "View" action to a row whose URL is a wp-admin page - #54215
Conversation
Since #53996 every Top videos widget row offers "View in new tab", but stats/video-plays sends the media editor as the video's URL, so the action opens wp-admin. toViewLiveUrl() now treats a wp-admin page as not live content, so the widget shows no action until the endpoint sends the permalink. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
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. Premium Analytics 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. |
Code Coverage SummaryCoverage changed in 1 file.
|
chihsuan
left a comment
There was a problem hiding this comment.
Nice catch on the media editor links! @dognose24 Tested well, LGTM. 🚀 Not blocking, but #53996 hasn't shipped yet, so could we make these entries empty with a Comment: and drop "video" from its pending ones? Otherwise the next release notes would contradict each other.
The action #53996 gave Top videos rows never reached a release, so this fix's entries become comments and the pending ones stop naming video. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
👋 It looks like you modified some previous changelog files, which caused some conflicts in the backport PR: #54241 In the future, please treat changelogs as history and avoid changing them. If you roll back a change in a future PR, you can just mention that in the new changelog. |
Part of STATS-552.
Proposed changes
Since #53996 every row in VideoPress's Top videos widget offers a "View in new tab" action, but the
stats/video-playsendpoint sendswp-admin/media.php?action=edit&attachment_id=<id>as a video's URL, so the action opens the media editor rather than the video. Per the design decision on STATS-552, video rows get no action rather than one that leads into wp-admin.toViewLiveUrl(), which decides in one place whether a row gets the action, now treats a wp-admin page as not live content and returns no URL for it. The Top videos widget needs no change; once the endpoint sends the public permalink (STATS-567) the action comes back by itself, and the Videos report (#54058) can pass the same row action as Posts & pages.Post and email rows are unaffected: their endpoints send the public URL.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
On a Jetpack site with Premium Analytics and at least one VideoPress video with plays, open the Stats dashboard.
🤖 Generated with Claude Code