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

[Gutenberg] Fix Media & Text block crash #10901

Closed
wants to merge 1 commit into from

Conversation

geriux
Copy link
Contributor

@geriux geriux commented Dec 4, 2019

Gutenberg PR -> WordPress/gutenberg#18907

Fixes #10876 Media & Text crash.

NOTE: This PR is just for testing the fix, do not merge.

To test:

  • Download the generated APK in this PR.
  • Open the Gutenberg Web editor:
  • Create a new post with this code:
<!-- wp:media-text {"mediaId":29,"mediaType":"image","imageFill":true,"focalPoint":{"x":0.52,"y":0.12}} -->
<div class="wp-block-media-text alignwide is-stacked-on-mobile is-image-fill"><figure class="wp-block-media-text__media" style="background-image:url(https://geriuxx-atomic-site-1.blog/wp-content/uploads/2019/12/img_0004-1.jpg);background-position:52% 12%"><img src="https://geriuxx-atomic-site-1.blog/wp-content/uploads/2019/12/img_0004-1.jpg" alt="" class="wp-image-29"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…","fontSize":"large"} -->
<p class="has-large-font-size"></p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->
  • Save
  • Open the newly created post from the app without metro running
  • Expect the Media & Text block to be visible without any crashes.

PR submission checklist:

  • I have considered adding unit tests where possible.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

Warnings
⚠️ PR is not assigned to a milestone.

Generated by 🚫 dangerJS

@peril-wordpress-mobile
Copy link

You can test the changes on this Pull Request by downloading the APK here.

@geriux geriux changed the title Fix crash in Gutenberg Media & Text block [Gutenberg] Fix Media & Text block crash Dec 4, 2019
@geriux geriux marked this pull request as ready for review December 4, 2019 13:46
@geriux geriux assigned malinajirka and unassigned malinajirka Dec 4, 2019
@geriux geriux closed this Dec 4, 2019
@geriux geriux deleted the fix/gutenberg-media-text-alignstyle branch May 4, 2020 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[WORDPRESS-ANDROID-M]: JavascriptException: TypeError: null is not an object (evaluating 'n.name')
2 participants