Skip to content

Consider Eventbrite URLs without event ids incorrect - #21247

Merged
kraftbj merged 4 commits into
masterfrom
fix/eventbrite-urls
Oct 1, 2021
Merged

kraftbj merged 4 commits into
masterfrom
fix/eventbrite-urls

Conversation

@alshakero

@alshakero alshakero commented Sep 30, 2021 •

Copy link
Copy Markdown
Member

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

@matticbot

Copy link
Copy Markdown
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

github-actions Bot commented Sep 30, 2021 •

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.
  • ⚠️ 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 need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review This PR is ready for review. labels Sep 30, 2021
ivan-ottinger
ivan-ottinger previously approved these changes Sep 30, 2021

@ivan-ottinger ivan-ottinger left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

@ivan-ottinger ivan-ottinger left a comment

Copy link
Copy Markdown
Contributor

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 need more details from you. This label will be auto-added until the PR meets all requirements. labels Oct 1, 2021
ivan-ottinger
ivan-ottinger previously approved these changes Oct 1, 2021

@ivan-ottinger ivan-ottinger left a comment

Copy link
Copy Markdown
Contributor

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 This PR is ready for review. 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

@samiff samiff left a comment

Copy link
Copy Markdown
Contributor

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 This PR is ready for review. 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

kraftbj commented Oct 1, 2021

Copy link
Copy Markdown
Contributor

r232649-wpcom

@github-actions

github-actions Bot commented Oct 1, 2021

Copy link
Copy Markdown
Contributor

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!

@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