You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Synced patterns (formerly named Reusable blocks) are only available on WPCOM sites.
In the mobile native version, we only cover the functionality of rendering the synced pattern. We don't support yet editing the content. However, its content might change locally due to side effects triggered during rendering.
As an example, having an Image block with a URL that doesn't contain the query parameter w (width) leads to an update. In this case, the Image block sets the width based on the size attribute and updates the URL. This update makes the editor crash with the error undefined is not a function.
After investigating the issue, I found out the culprit. The crash is related to footnotes, which it's logic is part of the updates made in the hook useEntityBlockEditor. Let me share the trace of this logic to better explain the issue:
Hook useEntityBlockEditor is used in the Provider component and in core/block (synced pattern):
In useEntityBlockEditor, the function onChange updates footnotes. This function is triggered when there's an update in the block, for instance, when an attribute is updated.
Describe the bug
Note
Synced patterns (formerly named Reusable blocks) are only available on WPCOM sites.
In the mobile native version, we only cover the functionality of rendering the synced pattern. We don't support yet editing the content. However, its content might change locally due to side effects triggered during rendering.
As an example, having an Image block with a URL that doesn't contain the query parameter
w
(width) leads to an update. In this case, the Image block sets the width based on the size attribute and updates the URL. This update makes the editor crash with the errorundefined is not a function
.To Reproduce
Preparation:
?w=1024
).Steps:
Expected behavior
The editor shouldn't crash when using synced patterns.
Screenshots
Smartphone (please complete the following information):
Additional context
N/A
The text was updated successfully, but these errors were encountered: