-
Notifications
You must be signed in to change notification settings - Fork 31
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
Uncaught TypeError: Cannot read properties of undefined (reading 'isSavingPost') #182
Comments
@dkotter I think it's because of this line of code: safe-svg/includes/optimizer.php Line 43 in f8f90d4
The JS need gutenberg, so, technically, this need to be updated from |
@turtlepod That makes sense to me but I've been unable to reproduce this. That JS file is only loaded if the optimizer feature is enabled (do this by returning |
And I guess one other thing in thinking through this more, I believe this was set up to fire not only in the editor but when media is directly uploaded, so I think loading the script on |
@dkotter I tested and I can reproduce. Yes, this issue is only if we use the safe_svg_optimizer_enabled filter. |
@turtlepod Thanks for the additional information. I had originally tested with Yoast but couldn't reproduce the issue. Turns out I had another plugin installed that was loading the proper dependencies which fixed the issue. I've opened #187 to address this, if you have time to test that and ensure it fixes things for you. |
@dkotter I tested and the fix is working as expected! Thank you! |
Describe the bug
JS fatal error. Uncaught TypeError: Cannot read properties of undefined (reading 'isSavingPost')
Steps to Reproduce
Enable Safe SVG in Classic Editor Edit Post
Screenshots, screen recording, code snippet
Environment information
WPEngine
WordPress information
WordPress 6.4.x
Code of Conduct
The text was updated successfully, but these errors were encountered: