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

Check if maxwidth exists before trying to call .length #21785

Merged
merged 2 commits into from
Nov 17, 2021

Conversation

thedebian
Copy link
Contributor

@thedebian thedebian commented Nov 17, 2021

Automattic/wp-calypso#58134

Changes proposed in this Pull Request:

This PR fixes an issue with the video block when handled by VideoPress causing errors on some existing block (see linked issue)

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

No

Testing instructions:

It seems a bit tricky to test, so, here is the procedure for wpcom

  • On a sandboxed site with an existing post containing a VideoPress video
  • By opening the post editor, the page shouldn't load
  • Apply the wpcom patch
  • ✅ Reloading the post should correctly load the Gutenberg editor

@thedebian thedebian added [Feature] VideoPress A feature to help you upload and insert videos on your site. [Status] Needs Team Review [Block] VideoPress labels Nov 17, 2021
@thedebian thedebian requested a review from roundhill November 17, 2021 15:46
@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Nov 17, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 17, 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: December 7, 2021.
  • Scheduled code freeze: November 30, 2021.

@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Nov 17, 2021
Copy link
Contributor

@roundhill roundhill left a comment

Choose a reason for hiding this comment

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

Confirmed that this fixes the crash!

@thedebian thedebian removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Nov 17, 2021
@jeherve jeherve added this to the jetpack/10.4 milestone Nov 17, 2021
@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Team Review labels Nov 17, 2021
@jeherve jeherve modified the milestones: jetpack/10.4, jetpack/10.3.1 Nov 17, 2021
@kraftbj kraftbj merged commit 13e4843 into master Nov 17, 2021
@kraftbj kraftbj deleted the fix/videopress-block-gutenberg-error branch November 17, 2021 22:08
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Nov 17, 2021
@kraftbj
Copy link
Contributor

kraftbj commented Nov 17, 2021

This was fixed on wp.com via r235192-wpcom

davidlonjon added a commit that referenced this pull request Nov 18, 2021
* master: (28 commits)
  Prepare for 10.4-a.7 (#21797)
  Check if maxwidth exists before trying to call .length (#21785)
  Podcast Player: Increase podcast shown (#21661)
  licensing: jetpack-js-test-runner is a dev dependency (#21794)
  Update dependency @mdn/browser-compat-data to v4.0.11 (#21792)
  Tests: Fix unit tests for wpcom (#21649)
  SSO: Fix Button Text Alignment on Mobile   (#18770)
  Add/my jetpack skeleton (#21464)
  Identity Crisis: add unit tests for has_identity_crisis and get_mismatched_urls (#21754)
  Remove special cases for calling changelogger on packages/changelogger (#21783)
  eslint-config-target-es: Release 1.0.0! (#21766)
  Revert "WPCOM no longer forces home_urls to be http" (#21769)
  WPCOM no longer forces home_urls to be http (#21747)
  Revert and fix "Revert "Assets: do not use the new method yet (#21760)"" (#21763)
  eslint-config-target-es: Fix README.md (#21743)
  codesniffer: Disable CI on PHP 8.1 (#21742)
  RNA Pricing card component: Fix case where prices before and after match (#21757)
  Janitorial: update Jetpack version for 10.4-a.6 cycle (#21762)
  Releases: prepare changelog for 10.4-a.5 release (#21758)
  Assets: do not use the new method yet (#21760)
  ...
davidlonjon added a commit that referenced this pull request Nov 19, 2021
* master: (28 commits)
  Prepare for 10.4-a.7 (#21797)
  Check if maxwidth exists before trying to call .length (#21785)
  Podcast Player: Increase podcast shown (#21661)
  licensing: jetpack-js-test-runner is a dev dependency (#21794)
  Update dependency @mdn/browser-compat-data to v4.0.11 (#21792)
  Tests: Fix unit tests for wpcom (#21649)
  SSO: Fix Button Text Alignment on Mobile   (#18770)
  Add/my jetpack skeleton (#21464)
  Identity Crisis: add unit tests for has_identity_crisis and get_mismatched_urls (#21754)
  Remove special cases for calling changelogger on packages/changelogger (#21783)
  eslint-config-target-es: Release 1.0.0! (#21766)
  Revert "WPCOM no longer forces home_urls to be http" (#21769)
  WPCOM no longer forces home_urls to be http (#21747)
  Revert and fix "Revert "Assets: do not use the new method yet (#21760)"" (#21763)
  eslint-config-target-es: Fix README.md (#21743)
  codesniffer: Disable CI on PHP 8.1 (#21742)
  RNA Pricing card component: Fix case where prices before and after match (#21757)
  Janitorial: update Jetpack version for 10.4-a.6 cycle (#21762)
  Releases: prepare changelog for 10.4-a.5 release (#21758)
  Assets: do not use the new method yet (#21760)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] VideoPress [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/ Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants