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

Use Arrays as Default Values for Parent and Ancestor in Block Settings #288

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

huubl
Copy link
Contributor

@huubl huubl commented Nov 8, 2024

When using ACF PRO v6.3.10, ACF Composer v3.2.0, and the Gutenberg plugin v19.6.0, blocks that are not cached (wp acorn acf:cache) cause errors and prevent them from registering correctly.

The following error appears in the developer console:

acf-pro-blocks.min.js?ver=6.3.10:1 Uncaught TypeError: Cannot read properties of undefined (reading 'attributes')

This issue seems to be related to changes in Block registration: normalize blockType.parent to array and using null defaults.

This change sets the default values for parent and ancestor as arrays, which resolves the issue.

@Log1x Log1x merged commit ff65e77 into Log1x:master Nov 8, 2024
2 checks passed
@Log1x
Copy link
Owner

Log1x commented Nov 8, 2024

thanks for the PR! 😄

@huubl huubl deleted the use-array-as-default branch November 9, 2024 00:24
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.

2 participants