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

Adding Spacer block generates an error #29471

Closed
fluiddot opened this issue Mar 2, 2021 · 1 comment · Fixed by wordpress-mobile/gutenberg-mobile#3208
Closed

Adding Spacer block generates an error #29471

fluiddot opened this issue Mar 2, 2021 · 1 comment · Fixed by wordpress-mobile/gutenberg-mobile#3208
Assignees
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Bug An existing feature does not function as intended

Comments

@fluiddot
Copy link
Contributor

fluiddot commented Mar 2, 2021

Description

Adding a Spacer block to the content generates the following error:

TypeError: Cannot read property 'orientation' of undefined

This error is located at:
    in SpacerEdit (at with-instance-id/index.js:18)
    in WithInstanceId(SpacerEdit) (at with-dispatch/index.js:96)
    in WithDispatch(WithInstanceId(SpacerEdit)) (at edit.native.js:17)
    in Edit (at align.js:149)
...

Step-by-step reproduction instructions

  1. Go to a post/page.
  2. Add a Spacer block.
  3. Observe the error.

Expected behaviour

Spacer block shouldn't generate any error when adding it to the content.

Actual behaviour

It generates the error described above.

Screenshots or screen recording (optional)

N/A

WordPress information

  • WordPress version: N/A
  • Gutenberg version: N/A
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Device: iPhone 8 - Simulator
  • Operating system: iOS 14.2
  • WordPress app version: 16.7 (DEV)
@fluiddot fluiddot added [Type] Bug An existing feature does not function as intended Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) labels Mar 2, 2021
@fluiddot fluiddot self-assigned this Mar 2, 2021
@fluiddot
Copy link
Contributor Author

fluiddot commented Mar 2, 2021

I noticed that in the native version of the BlockEdit component, we're not passing the context prop which is expected to be received in the edit components as it's described in the Block Context documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant