We cannot access the core/block-editor store if someone is using the Classic Editor. Therefore, I have added an additional check to see whether the selector is available. The change occurred in #243, which adds support for blocks without checking if blocks are available.
If not, we fallback to the method that we used earlier.
Although this is not the nicest solution, it works. And I do not have enough context to actually create something different here.
This PR can be summarized in the following changelog entry:
Fixes a bug where Yoast ACF analysis errors when the Classic Editor is installed.
Relevant technical choices:
Uses the "old" code (before #243) as a fallback for the Classic Editor.
Test instructions
This PR can be tested by following these steps:
Install Yoast SEO, Advanced Custom Fields (5.8.11), Classic Editor (1.5)
Checkout this branch
Activate Yoast ACF Analysis
Add a new Post, see that there are no errors in the console (and that Yoast ACF Analysis works fine).
Please ping devteam-core after merging this PR so that they can create a new RC
Summary
We cannot access the core/block-editor store if someone is using the Classic Editor. Therefore, I have added an additional check to see whether the selector is available. The change occurred in #243, which adds support for blocks without checking if blocks are available.
If not, we fallback to the method that we used earlier.
Although this is not the nicest solution, it works. And I do not have enough context to actually create something different here.
This PR can be summarized in the following changelog entry:
Relevant technical choices:
Test instructions
This PR can be tested by following these steps:
Please ping devteam-core after merging this PR so that they can create a new RC
Fixes https://yoast.atlassian.net/browse/QAK-1862