VideoPress, Invalid VP URL: Handle case when the URL doesn't contain VP GUID #42237
Conversation
|
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! |
Code Coverage SummaryCoverage changed in 2 files.
Full summary · PHP report · JS report Coverage check overridden by
I don't care about code coverage for this PR
|
phcp
left a comment
There was a problem hiding this comment.
Overall, it works great! I just noted one minor scenario: when passing an invalid URL, it falls back to the first video returned from the endpoint, but in that case, it should display an invalid URL error.
It's not 100% true; we are looking for a video by the file name. Eg. Am I still missing something? @phcp |
It was mostly for cases where |
@phcp, you were right. I've handled the described case. It's ready for re-review. |
phcp
left a comment
There was a problem hiding this comment.
Changes are working as expected. Thanks for the fixes!
Fixes #34741
Proposed changes:
NOTE: This fix only handles files from the same site since the media search API works in the site context.
Other information:
Jetpack product discussion
#34741
Does this pull request change what data or activity we track or use?
Testing instructions:
Insert From URLlink andpaste the video's linkand submit.