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

Consider Eventbrite URLs without event ids incorrect #21247

Merged
merged 4 commits into from
Oct 1, 2021

Conversation

alshakero
Copy link
Member

@alshakero alshakero commented Sep 30, 2021

Changes proposed in this Pull Request:

As awesomely explained here by @ivan-ottinger, testEmbedUrl helper only checks for status 200. Any URL (like Google.com) can return 200, even though it's a bad embed URL.

This PR marks 200 responses without event IDs incorrect. Hence, rendering an error and allowing the user to convert the embed to a link.

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

No

Fixes #14507

Testing instructions:

  1. Make sure Eventbrite Block: No error message with invalid urls #14507 isn't reproducible.
  2. Make sure you can embed Eventbrite URLs eg: https://www.eventbrite.com/e/lady-gaga-swietuje-love-for-sale-tickets-166928917887?aff=ebdssbcitybrowse&keep_tld=1

@alshakero alshakero added the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Sep 30, 2021
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello alshakero! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D67651-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@github-actions github-actions bot added [Block] Eventbrite [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Sep 30, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Sep 30, 2021

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.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team 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 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: October 5, 2021.
  • Scheduled code freeze: September 28, 2021.

@github-actions github-actions bot added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Sep 30, 2021
ivan-ottinger
ivan-ottinger previously approved these changes Sep 30, 2021
Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

Thank you Omar!

Looks good to me. 👍🏻 I have tested the PR on a local Jetpack site and it is working as expected (returning error message for incorrect URLs and properly embedding correct Eventbrite event URLs):

Markup on 2021-09-30 at 14:50:24

I haven't tested on WPCOM yet because the patch hasn't built (likely because of this unrelated issue: p1632857344442400-slack-CBG1CP4EN).

@alshakero
Copy link
Member Author

@ivan-ottinger Thank you for the review! It turns out we don't need to wait for testEmbedUrl to resolve before checking the validity of the URL. I moved the check higher, can you please re-check? Thanks!

@ivan-ottinger ivan-ottinger self-requested a review October 1, 2021 07:30
ivan-ottinger
ivan-ottinger previously approved these changes Oct 1, 2021
Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

Works as expected. 👍🏻

That's great we don't have to wait for testEmbedUrl to resolve before checking the validity of the URL. The error message (when the entered link is not a proper even link) displays much faster now.

@alshakero alshakero added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Oct 1, 2021
ivan-ottinger
ivan-ottinger previously approved these changes Oct 1, 2021
Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

Looks like additional approval was necessary after rebase.

@sdixon194 sdixon194 added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Oct 1, 2021
@samiff samiff self-requested a review October 1, 2021 19:55
Copy link
Contributor

@samiff samiff left a comment

Choose a reason for hiding this comment

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

Tested well for me 👍

@samiff samiff added this to the jetpack/10.3 milestone Oct 1, 2021
@samiff samiff added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Oct 1, 2021
@kraftbj kraftbj merged commit 4ebba49 into master Oct 1, 2021
@kraftbj kraftbj deleted the fix/eventbrite-urls branch October 1, 2021 20:29
@kraftbj
Copy link
Contributor

kraftbj commented Oct 1, 2021

r232649-wpcom

@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2021

Great news! One last step: head over to your WordPress.com diff, D67651-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

retrofox pushed a commit that referenced this pull request Oct 4, 2021
…21247)

* [not verified] Consider URLs without event ids incorrect

* [not verified] Consider URLs without event ids incorrect

* [not verified] Don't wait for testEmbedUrl before validating eventId

* Update fix-eventbrite-urls

Co-authored-by: Samiff <samiff@users.noreply.github.com>
@jeherve jeherve removed the [Status] Ready to Merge Go ahead, you can push that green button! label Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Eventbrite [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eventbrite Block: No error message with invalid urls
7 participants