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
Describe the bug
A JavaScript error is fired in the Block Editor when ClassifAI has not been set up. This prevents a post from being saved. This occurs because ClassifAI looks for a meta value without checking for its existence.
The JavaScript error says:
Uncaught TypeError: Cannot ready property '_classifai_error' of undefined
Steps to Reproduce
Install and activate ClassifAI
Do not enter any details
Create a post in the block editor and save, ideally one with post meta boxes
A JavaScript error is fired (Screenshot below)
Expected behavior
Post saves without any JavaScript errors.
Screenshots
Environment information
Device: Macbook Pro
OS: MacOS 11.4
Browser and version: Brave (Chromium 91)
WordPress version: 5.7.2
Additional context
The text was updated successfully, but these errors were encountered:
@junaidbhura I can't reproduce the issue on WP 5.7.2, new multisite with unconfigured ClassifAI (develop branch). Watching the value of meta, it returns an empty array in my test, which means that the variable is not undefined. Can you give me more detailed instructions?
I agree with your additional check added in #286, we should always check the existence of variable first before using them. But I want to reproduce the issue first before merging your PR.
Describe the bug
A JavaScript error is fired in the Block Editor when ClassifAI has not been set up. This prevents a post from being saved. This occurs because ClassifAI looks for a meta value without checking for its existence.
The JavaScript error says:
Steps to Reproduce
Expected behavior
Post saves without any JavaScript errors.
Screenshots
Environment information
Additional context
The text was updated successfully, but these errors were encountered: