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

Fix usages of uSES with missing getServerSnapshot #60943

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

jsnajdr
Copy link
Member

@jsnajdr jsnajdr commented Apr 22, 2024

Fixes #60924. The useSyncExternalStore call that I introduced in #60879 was missing the third getServerSnapshot parameter used in SSR mode. That triggered an error:

Internal error: Error: Missing getServerSnapshot, which is required for server-rendered content.

I also found another instance of the same bug in the PluginArea component.

@jsnajdr jsnajdr added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Apr 22, 2024
@jsnajdr jsnajdr requested a review from Mamaduka April 22, 2024 07:38
@jsnajdr jsnajdr self-assigned this Apr 22, 2024
Copy link

github-actions bot commented Apr 22, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: jsnajdr <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: diegohaz <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

Thank you, @jsnajdr!

@jsnajdr jsnajdr merged commit 2485128 into trunk Apr 22, 2024
61 of 62 checks passed
@jsnajdr jsnajdr deleted the fix/uses-server-snapshots branch April 22, 2024 08:21
@github-actions github-actions bot added this to the Gutenberg 18.3 milestone Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SlotFill v27.4.0 error on server environments
2 participants